File tree 1 file changed +4
-4
lines changed
compiler/rustc_trait_selection/src/traits/codegen
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ use rustc_middle::ty::{self, TyCtxt};
19
19
/// obligations *could be* resolved if we wanted to.
20
20
/// Assumes that this is run after the entire crate has been successfully type-checked.
21
21
pub fn codegen_fulfill_obligation < ' tcx > (
22
- ty : TyCtxt < ' tcx > ,
22
+ tcx : TyCtxt < ' tcx > ,
23
23
( param_env, trait_ref) : ( ty:: ParamEnv < ' tcx > , ty:: PolyTraitRef < ' tcx > ) ,
24
24
) -> Result < ImplSource < ' tcx , ( ) > , ErrorReported > {
25
- // Remove any references to regions; this helps improve caching.
26
- let trait_ref = ty . erase_regions ( & trait_ref) ;
25
+ // Remove any references to regions and normalize ; this helps improve caching.
26
+ let trait_ref = tcx . normalize_erasing_regions ( param_env , trait_ref) ;
27
27
28
28
debug ! (
29
29
"codegen_fulfill_obligation(trait_ref={:?}, def_id={:?})" ,
@@ -33,7 +33,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
33
33
34
34
// Do the initial selection for the obligation. This yields the
35
35
// shallow result we are looking for -- that is, what specific impl.
36
- ty . infer_ctxt ( ) . enter ( |infcx| {
36
+ tcx . infer_ctxt ( ) . enter ( |infcx| {
37
37
let mut selcx = SelectionContext :: new ( & infcx) ;
38
38
39
39
let obligation_cause = ObligationCause :: dummy ( ) ;
You can’t perform that action at this time.
0 commit comments