Skip to content

Commit 30b2a03

Browse files
committed
Auto merge of #2792 - RalfJung:rustup, r=RalfJung
Rustup
2 parents bc1b6da + 172404c commit 30b2a03

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
639377ed737b25830ec44dc6acf93467c980316a
1+
3eb5c4581a386b13c414e8c8bd73846ef37236d1

src/eval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
363363
tcx,
364364
ty::ParamEnv::reveal_all(),
365365
start_id,
366-
tcx.mk_substs(::std::iter::once(ty::subst::GenericArg::from(main_ret_ty))),
366+
tcx.intern_substs(&[ty::subst::GenericArg::from(main_ret_ty)]),
367367
)
368368
.unwrap()
369369
.unwrap();

src/machine.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,8 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
907907
panic!("extern_statics cannot contain wildcards")
908908
};
909909
let (shim_size, shim_align, _kind) = ecx.get_alloc_info(alloc_id);
910-
let extern_decl_layout =
911-
ecx.tcx.layout_of(ty::ParamEnv::empty().and(ecx.tcx.type_of(def_id))).unwrap();
910+
let def_ty = ecx.tcx.type_of(def_id).subst_identity();
911+
let extern_decl_layout = ecx.tcx.layout_of(ty::ParamEnv::empty().and(def_ty)).unwrap();
912912
if extern_decl_layout.size != shim_size || extern_decl_layout.align.abi != shim_align {
913913
throw_unsup_format!(
914914
"`extern` static `{name}` from crate `{krate}` has been declared \

0 commit comments

Comments
 (0)