File tree 1 file changed +3
-2
lines changed
compiler/rustc_trait_selection/src/traits
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,13 @@ impl<'tcx> TraitEngine<'tcx> for FulfillmentContext<'tcx> {
116
116
fn register_predicate_obligation (
117
117
& mut self ,
118
118
infcx : & InferCtxt < ' tcx > ,
119
- obligation : PredicateObligation < ' tcx > ,
119
+ mut obligation : PredicateObligation < ' tcx > ,
120
120
) {
121
121
assert_eq ! ( self . usable_in_snapshot, infcx. num_open_snapshots( ) ) ;
122
122
// this helps to reduce duplicate errors, as well as making
123
123
// debug output much nicer to read and so on.
124
- let obligation = infcx. resolve_vars_if_possible ( obligation) ;
124
+ debug_assert ! ( !obligation. param_env. has_non_region_infer( ) ) ;
125
+ obligation. predicate = infcx. resolve_vars_if_possible ( obligation. predicate ) ;
125
126
126
127
debug ! ( ?obligation, "register_predicate_obligation" ) ;
127
128
You can’t perform that action at this time.
0 commit comments