Skip to content
Merged

Rustup #2792

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
639377ed737b25830ec44dc6acf93467c980316a
3eb5c4581a386b13c414e8c8bd73846ef37236d1
2 changes: 1 addition & 1 deletion src/eval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ pub fn create_ecx<'mir, 'tcx: 'mir>(
tcx,
ty::ParamEnv::reveal_all(),
start_id,
tcx.mk_substs(::std::iter::once(ty::subst::GenericArg::from(main_ret_ty))),
tcx.intern_substs(&[ty::subst::GenericArg::from(main_ret_ty)]),
)
.unwrap()
.unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/machine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -907,8 +907,8 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
panic!("extern_statics cannot contain wildcards")
};
let (shim_size, shim_align, _kind) = ecx.get_alloc_info(alloc_id);
let extern_decl_layout =
ecx.tcx.layout_of(ty::ParamEnv::empty().and(ecx.tcx.type_of(def_id))).unwrap();
let def_ty = ecx.tcx.type_of(def_id).subst_identity();
let extern_decl_layout = ecx.tcx.layout_of(ty::ParamEnv::empty().and(def_ty)).unwrap();
if extern_decl_layout.size != shim_size || extern_decl_layout.align.abi != shim_align {
throw_unsup_format!(
"`extern` static `{name}` from crate `{krate}` has been declared \
Expand Down