This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/rustc_trait_selection/src/traits/codegen Expand file tree Collapse file tree 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};
1919/// obligations *could be* resolved if we wanted to.
2020/// Assumes that this is run after the entire crate has been successfully type-checked.
2121pub fn codegen_fulfill_obligation < ' tcx > (
22- ty : TyCtxt < ' tcx > ,
22+ tcx : TyCtxt < ' tcx > ,
2323 ( param_env, trait_ref) : ( ty:: ParamEnv < ' tcx > , ty:: PolyTraitRef < ' tcx > ) ,
2424) -> 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) ;
2727
2828 debug ! (
2929 "codegen_fulfill_obligation(trait_ref={:?}, def_id={:?})" ,
@@ -33,7 +33,7 @@ pub fn codegen_fulfill_obligation<'tcx>(
3333
3434 // Do the initial selection for the obligation. This yields the
3535 // shallow result we are looking for -- that is, what specific impl.
36- ty . infer_ctxt ( ) . enter ( |infcx| {
36+ tcx . infer_ctxt ( ) . enter ( |infcx| {
3737 let mut selcx = SelectionContext :: new ( & infcx) ;
3838
3939 let obligation_cause = ObligationCause :: dummy ( ) ;
You can’t perform that action at this time.
0 commit comments