about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-02-16 15:07:32 +0000
committerMichael Goulet <michael@errs.io>2024-02-16 15:07:37 +0000
commitf624d55ea77b1b24e9294818ee1d6b1da9d0ec2d (patch)
tree73c756a8874ee51120d6acf61fc6c32904d26ba9 /compiler/rustc_trait_selection/src
parenta9dbf63087049549a74c0f31705df92bcf15098f (diff)
downloadrust-f624d55ea77b1b24e9294818ee1d6b1da9d0ec2d.tar.gz
rust-f624d55ea77b1b24e9294818ee1d6b1da9d0ec2d.zip
Nits
Diffstat (limited to 'compiler/rustc_trait_selection/src')
-rw-r--r--compiler/rustc_trait_selection/src/traits/query/normalize.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/query/normalize.rs b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
index 6ed9ac91027..0f6c0abd280 100644
--- a/compiler/rustc_trait_selection/src/traits/query/normalize.rs
+++ b/compiler/rustc_trait_selection/src/traits/query/normalize.rs
@@ -37,6 +37,12 @@ impl<'cx, 'tcx> At<'cx, 'tcx> {
     /// normalizing, but for now should be used only when we actually
     /// know that normalization will succeed, since error reporting
     /// and other details are still "under development".
+    ///
+    /// This normalization should *only* be used when the projection does not
+    /// have possible ambiguity or may not be well-formed.
+    ///
+    /// After codegen, when lifetimes do not matter, it is preferable to instead
+    /// use [`TyCtxt::normalize_erasing_regions`], which wraps this procedure.
     fn query_normalize<T>(self, value: T) -> Result<Normalized<'tcx, T>, NoSolution>
     where
         T: TypeFoldable<TyCtxt<'tcx>>,