Skip to content

Bump rust version #2333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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