diff options
| author | csmoe <csmoe@msn.com> | 2019-09-26 16:11:23 +0000 |
|---|---|---|
| committer | csmoe <csmoe@msn.com> | 2019-09-29 16:17:46 +0000 |
| commit | 1f8e1d8aea495ec22fa33cefcfacbcb6ba3bad1d (patch) | |
| tree | 7604f2e062c3cb245b9ea178e90e60be1f087ee5 /src/librustc_codegen_ssa | |
| parent | eab060f4da1eeb302953b76d35278679bfeb76b0 (diff) | |
remove ClosureSubsts with SubstsRef
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/mir/mod.rs | 3 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/mir/rvalue.rs | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/mir/mod.rs b/src/librustc_codegen_ssa/mir/mod.rs index 4f3a8bdb540..30d519c8733 100644 --- a/src/librustc_codegen_ssa/mir/mod.rs +++ b/src/librustc_codegen_ssa/mir/mod.rs @@ -615,7 +615,8 @@ fn arg_local_refs<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>( }; let (def_id, upvar_substs) = match closure_layout.ty.kind { - ty::Closure(def_id, substs) => (def_id, UpvarSubsts::Closure(substs)), + ty::Closure(def_id, substs) => (def_id, + UpvarSubsts::Closure(rustc::ty::ClosureSubsts::from_ref(substs))), ty::Generator(def_id, substs, _) => (def_id, UpvarSubsts::Generator(substs)), _ => bug!("upvar debuginfo with non-closure arg0 type `{}`", closure_layout.ty) }; diff --git a/src/librustc_codegen_ssa/mir/rvalue.rs b/src/librustc_codegen_ssa/mir/rvalue.rs index 9b69383b455..9cc21a28b27 100644 --- a/src/librustc_codegen_ssa/mir/rvalue.rs +++ b/src/librustc_codegen_ssa/mir/rvalue.rs @@ -201,7 +201,9 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { match operand.layout.ty.kind { ty::Closure(def_id, substs) => { let instance = Instance::resolve_closure( - bx.cx().tcx(), def_id, substs, ty::ClosureKind::FnOnce); + bx.cx().tcx(), def_id, + rustc::ty::ClosureSubsts::from_ref(substs), + ty::ClosureKind::FnOnce); OperandValue::Immediate(bx.cx().get_fn(instance)) } _ => { |
