Skip to content

Commit 72033c9

Browse files
committed
don't fold ParamEnv in register_predicate_obligation
1 parent 604f185 commit 72033c9

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+2
-2
lines changed

compiler/rustc_trait_selection/src/traits/fulfill.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
116116
fn register_predicate_obligation(
117117
&mut self,
118118
infcx: &InferCtxt<'tcx>,
119-
obligation: PredicateObligation<'tcx>,
119+
mut obligation: PredicateObligation<'tcx>,
120120
) {
121121
assert_eq!(self.usable_in_snapshot, infcx.num_open_snapshots());
122122
// this helps to reduce duplicate errors, as well as making
123123
// debug output much nicer to read and so on.
124-
let obligation = infcx.resolve_vars_if_possible(obligation);
124+
obligation.predicate = infcx.resolve_vars_if_possible(obligation.predicate);
125125

126126
debug!(?obligation, "register_predicate_obligation");
127127

0 commit comments

Comments
 (0)