use infcx.tcx, so we get the local tcx
The use of tcx/gcx in this function is subtle.
This commit is contained in:
parent
bad80fe4ba
commit
8179a4be8a
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue