Skip to content

Commit 8179a4b

Browse files
nikomatsakiscsmoe
authored andcommitted
use infcx.tcx, so we get the local tcx
The use of tcx/gcx in this function is subtle.
1 parent bad80fe commit 8179a4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/librustc_typeck/coherence/builtin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ pub fn coerce_unsized_info<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
372372
}
373373
};
374374

375-
let mut fulfill_cx = TraitEngine::new(tcx);
375+
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
376376

377377
// Register an obligation for `A: Trait<B>`.
378378
let cause = traits::ObligationCause::misc(span, impl_node_id);

0 commit comments

Comments
 (0)