about summary refs log tree commit diff
diff options
context:
space:
mode:
authorlcnr <rust@lcnr.de>2023-07-04 10:34:27 +0200
committerlcnr <rust@lcnr.de>2023-07-04 10:34:27 +0200
commit312994243a224477a75c78344fa6c0406e3b2de2 (patch)
tree2f98e9e6e3b1cb7d9dad9f0b5af97ac9e91645d8
parentb468bfb36183bd1e688c16687139bcfa886efff6 (diff)
downloadrust-312994243a224477a75c78344fa6c0406e3b2de2.tar.gz
rust-312994243a224477a75c78344fa6c0406e3b2de2.zip
extend comment
-rw-r--r--compiler/rustc_trait_selection/src/traits/wf.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/wf.rs b/compiler/rustc_trait_selection/src/traits/wf.rs
index b0798ace60d..ae7236e30f5 100644
--- a/compiler/rustc_trait_selection/src/traits/wf.rs
+++ b/compiler/rustc_trait_selection/src/traits/wf.rs
@@ -304,6 +304,11 @@ impl<'a, 'tcx> WfPredicates<'a, 'tcx> {
 
     fn normalize(self, infcx: &InferCtxt<'tcx>) -> Vec<traits::PredicateObligation<'tcx>> {
         // Do not normalize `wf` obligations with the new solver.
+        //
+        // The current deep normalization routine with the new solver does not
+        // handle ambiguity and the new solver correctly deals with unnnormalized goals.
+        // If the user relies on normalized types, e.g. for `fn implied_outlives_bounds`,
+        // it is their responsibility to normalize while avoiding ambiguity.
         if infcx.next_trait_solver() {
             return self.out;
         }