diff --git a/rust-version b/rust-version index 682914e882..b726558b76 100644 --- a/rust-version +++ b/rust-version @@ -1 +1 @@ -46b8c23f3eb5e4d0e0aa27eb3f20d5b8fc3ed51f +4045ce641a9eede71cc12031a2cd71692b273890 diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 28d4733718..a942390e54 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -450,7 +450,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx let msg = match e { CreatedPointerTag(tag, None) => format!("created tag {tag:?}"), CreatedPointerTag(tag, Some((alloc_id, range))) => - format!("created tag {tag:?} at {alloc_id}{}", HexRange(range)), + format!("created tag {tag:?} at {alloc_id:?}{}", HexRange(range)), PoppedPointerTag(item, tag) => match tag { None => diff --git a/src/helpers.rs b/src/helpers.rs index c051d44fa2..7e702e0656 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -699,7 +699,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // FIXME: We are re-getting the allocation each time around the loop. // Would be nice if we could somehow "extend" an existing AllocRange. let alloc = this.get_ptr_alloc(ptr.offset(len, this)?, size1, Align::ONE)?.unwrap(); // not a ZST, so we will get a result - let byte = alloc.read_integer(Size::ZERO, size1)?.to_u8()?; + let byte = alloc.read_integer(alloc_range(Size::ZERO, size1))?.to_u8()?; if byte == 0 { break; } else { @@ -721,7 +721,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx // FIXME: We are re-getting the allocation each time around the loop. // Would be nice if we could somehow "extend" an existing AllocRange. let alloc = this.get_ptr_alloc(ptr, size2, align2)?.unwrap(); // not a ZST, so we will get a result - let wchar = alloc.read_integer(Size::ZERO, size2)?.to_u16()?; + let wchar = alloc.read_integer(alloc_range(Size::ZERO, size2))?.to_u16()?; if wchar == 0 { break; } else { diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index cc2ea0b76d..efc38fdae3 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -1097,7 +1097,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx AllocKind::LiveData => { // This should have alloc_extra data. let alloc_extra = this.get_alloc_extra(alloc_id).unwrap(); - trace!("Stacked Borrows tag {tag:?} exposed in {alloc_id}"); + trace!("Stacked Borrows tag {tag:?} exposed in {alloc_id:?}"); alloc_extra.stacked_borrows.as_ref().unwrap().borrow_mut().exposed_tags.insert(tag); } AllocKind::Function | AllocKind::Dead => { diff --git a/src/stacked_borrows/diagnostics.rs b/src/stacked_borrows/diagnostics.rs index a7b8e5f13c..fe3716a911 100644 --- a/src/stacked_borrows/diagnostics.rs +++ b/src/stacked_borrows/diagnostics.rs @@ -140,9 +140,8 @@ impl AllocHistory { stack: &Stack, ) -> InterpError<'tcx> { let action = format!( - "trying to reborrow {derived_from:?} for {:?} permission at {}[{:#x}]", + "trying to reborrow {derived_from:?} for {:?} permission at {alloc_id:?}[{:#x}]", new.perm, - alloc_id, error_offset.bytes(), ); err_sb_ub( @@ -163,8 +162,7 @@ impl AllocHistory { stack: &Stack, ) -> InterpError<'tcx> { let action = format!( - "attempting a {access} using {tag:?} at {}[{:#x}]", - alloc_id, + "attempting a {access} using {tag:?} at {alloc_id:?}[{:#x}]", error_offset.bytes(), ); err_sb_ub(