Skip to content

Commit

Permalink
extend comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jul 4, 2023
1 parent b468bfb commit 3129942
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_trait_selection/src/traits/wf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3129942

Please sign in to comment.