use infcx.tcx, so we get the local tcx

The use of tcx/gcx in this function is subtle.
This commit is contained in:
Niko Matsakis 2018-03-22 12:22:03 -04:00 committed by csmoe
parent bad80fe4ba
commit 8179a4be8a

View file

@ -372,7 +372,7 @@ pub fn coerce_unsized_info<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
}
};
let mut fulfill_cx = TraitEngine::new(tcx);
let mut fulfill_cx = TraitEngine::new(infcx.tcx);
// Register an obligation for `A: Trait<B>`.
let cause = traits::ObligationCause::misc(span, impl_node_id);