This commit is contained in:
Ralf Jung 2022-03-12 09:46:10 -05:00
parent c58298ce22
commit 27d5b846ee
3 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
2c6a29af35a81e20f8af4c32bf1b55c59b89eccd
258256697b8550860be0f6194dec532ac616c2c1

View File

@ -298,7 +298,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
trace!("UnsafeCellVisitor: {:?} {:?}", *v, v.layout.ty);
let is_unsafe_cell = match v.layout.ty.kind() {
ty::Adt(adt, _) =>
Some(adt.did) == self.ecx.tcx.lang_items().unsafe_cell_type(),
Some(adt.did()) == self.ecx.tcx.lang_items().unsafe_cell_type(),
_ => false,
};
if is_unsafe_cell {

View File

@ -134,7 +134,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let dest = this.force_allocation(dest)?;
if let ty::Adt(adt, _) = dest.layout.ty.kind() {
if !adt.repr.c() {
if !adt.repr().c() {
throw_ub_format!(
"miri_resolve_frame must be declared with a `#[repr(C)]` return type"
);