Skip to content

Commit

Permalink
Auto merge of #2333 - rust-lang:miriup, r=oli-obk
Browse files Browse the repository at this point in the history
Bump rust version

rustc changes: rust-lang/rust#98811

rustc issue: rust-lang/rust#98922
  • Loading branch information
bors committed Jul 5, 2022
2 parents 4dacf5a + afb937a commit 178e7f3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion rust-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
46b8c23f3eb5e4d0e0aa27eb3f20d5b8fc3ed51f
4045ce641a9eede71cc12031a2cd71692b273890
2 changes: 1 addition & 1 deletion src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =>
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/stacked_borrows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
6 changes: 2 additions & 4 deletions src/stacked_borrows/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit 178e7f3

Please sign in to comment.