diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-11-08 09:45:48 -0500 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-11-18 07:47:37 -0500 |
| commit | 2dff9a49e5be5857610336e585eb8e7267dd142e (patch) | |
| tree | 420514091c98b9fdae3c2d8c2331a2178e669095 /src/librustc_trans_utils | |
| parent | 716f75b1b84e6f615b4ab80965dfa9a2fc566a31 (diff) | |
stop using the `closure_kinds` query / table for anything
Closure Kind is now extracted from the closure substs exclusively.
Diffstat (limited to 'src/librustc_trans_utils')
| -rw-r--r-- | src/librustc_trans_utils/monomorphize.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_trans_utils/monomorphize.rs b/src/librustc_trans_utils/monomorphize.rs index ab61dacf010..1f8d273d8fb 100644 --- a/src/librustc_trans_utils/monomorphize.rs +++ b/src/librustc_trans_utils/monomorphize.rs @@ -86,7 +86,7 @@ pub fn resolve_closure<'a, 'tcx> ( requested_kind: ty::ClosureKind) -> Instance<'tcx> { - let actual_kind = tcx.closure_kind(def_id); + let actual_kind = substs.closure_kind(def_id, tcx); match needs_fn_once_adapter_shim(actual_kind, requested_kind) { Ok(true) => fn_once_adapter_instance(tcx, def_id, substs), |
