]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_trait_selection/src/traits/query/normalize.rs
Auto merge of #105119 - JakobDegen:inline-experiments, r=cjgillot
[rust.git] / compiler / rustc_trait_selection / src / traits / query / normalize.rs
index 1aed66308709e33a8e43df92298e951c4d549b9d..f899321fc01e1e4d1a13ea625b4185871c67fe41 100644 (file)
 pub use rustc_middle::traits::query::NormalizationResult;
 
 pub trait QueryNormalizeExt<'tcx> {
+    /// Normalize a value using the `QueryNormalizer`.
+    ///
+    /// 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<'tcx>;