diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-03-22 12:22:03 -0400 |
|---|---|---|
| committer | csmoe <35686186+csmoe@users.noreply.github.com> | 2018-03-23 09:22:07 +0800 |
| commit | 8179a4be8aa2aeff32d1e8aca1bb58aee4271533 (patch) | |
| tree | 37c146503f421a85c220705b66ad2416bbce12f9 | |
| parent | bad80fe4ba4420bf58b7e11929ef40f458845037 (diff) | |
| download | rust-8179a4be8aa2aeff32d1e8aca1bb58aee4271533.tar.gz rust-8179a4be8aa2aeff32d1e8aca1bb58aee4271533.zip | |
use infcx.tcx, so we get the local tcx
The use of tcx/gcx in this function is subtle.
| -rw-r--r-- | src/librustc_typeck/coherence/builtin.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_typeck/coherence/builtin.rs b/src/librustc_typeck/coherence/builtin.rs index 8a1f827749a..bc674aa15fd 100644 --- a/src/librustc_typeck/coherence/builtin.rs +++ b/src/librustc_typeck/coherence/builtin.rs @@ -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); |
