Skip to content

Commit 88a8bf3

Browse files
committed
change usages of type_of to bound_type_of
1 parent 1b4db45 commit 88a8bf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/machine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,9 @@ impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx> {
901901
panic!("extern_statics cannot contain wildcards")
902902
};
903903
let (shim_size, shim_align, _kind) = ecx.get_alloc_info(alloc_id);
904+
let def_ty = ecx.tcx.bound_type_of(def_id).subst_identity();
904905
let extern_decl_layout =
905-
ecx.tcx.layout_of(ty::ParamEnv::empty().and(ecx.tcx.type_of(def_id))).unwrap();
906+
ecx.tcx.layout_of(ty::ParamEnv::empty().and(def_ty)).unwrap();
906907
if extern_decl_layout.size != shim_size || extern_decl_layout.align.abi != shim_align {
907908
throw_unsup_format!(
908909
"`extern` static `{name}` from crate `{krate}` has been declared \

0 commit comments

Comments
 (0)