Skip to content

Commit 178e7f3

Browse files
committed
Auto merge of rust-lang#2333 - rust-lang:miriup, r=oli-obk
Bump rust version rustc changes: rust-lang#98811 rustc issue: rust-lang#98922
2 parents 4dacf5a + afb937a commit 178e7f3

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

rust-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
46b8c23f3eb5e4d0e0aa27eb3f20d5b8fc3ed51f
1+
4045ce641a9eede71cc12031a2cd71692b273890

src/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
450450
let msg = match e {
451451
CreatedPointerTag(tag, None) => format!("created tag {tag:?}"),
452452
CreatedPointerTag(tag, Some((alloc_id, range))) =>
453-
format!("created tag {tag:?} at {alloc_id}{}", HexRange(range)),
453+
format!("created tag {tag:?} at {alloc_id:?}{}", HexRange(range)),
454454
PoppedPointerTag(item, tag) =>
455455
match tag {
456456
None =>

src/helpers.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
699699
// FIXME: We are re-getting the allocation each time around the loop.
700700
// Would be nice if we could somehow "extend" an existing AllocRange.
701701
let alloc = this.get_ptr_alloc(ptr.offset(len, this)?, size1, Align::ONE)?.unwrap(); // not a ZST, so we will get a result
702-
let byte = alloc.read_integer(Size::ZERO, size1)?.to_u8()?;
702+
let byte = alloc.read_integer(alloc_range(Size::ZERO, size1))?.to_u8()?;
703703
if byte == 0 {
704704
break;
705705
} else {
@@ -721,7 +721,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
721721
// FIXME: We are re-getting the allocation each time around the loop.
722722
// Would be nice if we could somehow "extend" an existing AllocRange.
723723
let alloc = this.get_ptr_alloc(ptr, size2, align2)?.unwrap(); // not a ZST, so we will get a result
724-
let wchar = alloc.read_integer(Size::ZERO, size2)?.to_u16()?;
724+
let wchar = alloc.read_integer(alloc_range(Size::ZERO, size2))?.to_u16()?;
725725
if wchar == 0 {
726726
break;
727727
} else {

src/stacked_borrows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1097,7 +1097,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
10971097
AllocKind::LiveData => {
10981098
// This should have alloc_extra data.
10991099
let alloc_extra = this.get_alloc_extra(alloc_id).unwrap();
1100-
trace!("Stacked Borrows tag {tag:?} exposed in {alloc_id}");
1100+
trace!("Stacked Borrows tag {tag:?} exposed in {alloc_id:?}");
11011101
alloc_extra.stacked_borrows.as_ref().unwrap().borrow_mut().exposed_tags.insert(tag);
11021102
}
11031103
AllocKind::Function | AllocKind::Dead => {

src/stacked_borrows/diagnostics.rs

+2-4
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ impl AllocHistory {
140140
stack: &Stack,
141141
) -> InterpError<'tcx> {
142142
let action = format!(
143-
"trying to reborrow {derived_from:?} for {:?} permission at {}[{:#x}]",
143+
"trying to reborrow {derived_from:?} for {:?} permission at {alloc_id:?}[{:#x}]",
144144
new.perm,
145-
alloc_id,
146145
error_offset.bytes(),
147146
);
148147
err_sb_ub(
@@ -163,8 +162,7 @@ impl AllocHistory {
163162
stack: &Stack,
164163
) -> InterpError<'tcx> {
165164
let action = format!(
166-
"attempting a {access} using {tag:?} at {}[{:#x}]",
167-
alloc_id,
165+
"attempting a {access} using {tag:?} at {alloc_id:?}[{:#x}]",
168166
error_offset.bytes(),
169167
);
170168
err_sb_ub(

0 commit comments

Comments
 (0)