Skip to content

Commit 416cddb

Browse files
committed
Auto merge of rust-lang#2376 - RalfJung:rustup, r=RalfJung
rustup
2 parents 006bb3c + e8ab64e commit 416cddb

9 files changed

+13
-23
lines changed

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6077b7cda466afa2b75a62b232ab46dbeb148bcb
1+
db41351753df840773ca628d8daa040e95d00eef

src/helpers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
631631

632632
// Ensure that the access is within bounds.
633633
assert!(op_place.layout.size >= offset + layout.size);
634-
let value_place = op_place.offset(offset, MemPlaceMeta::None, layout, this)?;
634+
let value_place = op_place.offset(offset, layout, this)?;
635635
Ok(value_place)
636636
}
637637

src/shims/backtrace.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
104104
for (i, ptr) in ptrs.into_iter().enumerate() {
105105
let offset = ptr_layout.size * i.try_into().unwrap();
106106

107-
let op_place =
108-
buf_place.offset(offset, MemPlaceMeta::None, ptr_layout, this)?;
107+
let op_place = buf_place.offset(offset, ptr_layout, this)?;
109108

110109
this.write_pointer(ptr, &op_place.into())?;
111110
}

src/shims/windows/foreign_items.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,13 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
152152
.collect();
153153

154154
// Set page size.
155-
let page_size = system_info.offset(
156-
field_offsets[2],
157-
MemPlaceMeta::None,
158-
dword_layout,
159-
&this.tcx,
160-
)?;
155+
let page_size = system_info.offset(field_offsets[2], dword_layout, &this.tcx)?;
161156
this.write_scalar(
162157
Scalar::from_int(PAGE_SIZE, dword_layout.size),
163158
&page_size.into(),
164159
)?;
165160
// Set number of processors.
166-
let num_cpus = system_info.offset(
167-
field_offsets[6],
168-
MemPlaceMeta::None,
169-
dword_layout,
170-
&this.tcx,
171-
)?;
161+
let num_cpus = system_info.offset(field_offsets[6], dword_layout, &this.tcx)?;
172162
this.write_scalar(Scalar::from_int(NUM_CPUS, dword_layout.size), &num_cpus.into())?;
173163
}
174164

tests/compiletest.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ fn run_tests(mode: Mode, path: &str, target: Option<String>) -> Result<()> {
1919
// Less aggressive warnings to make the rustc toolstate management less painful.
2020
// (We often get warnings when e.g. a feature gets stabilized or some lint gets added/improved.)
2121
flags.push("-Astable-features".to_owned());
22+
flags.push("-Aunused".to_owned());
2223
} else {
2324
flags.push("-Dwarnings".to_owned());
24-
flags.push("-Dunused".to_owned()); // overwrite the -Aunused in compiletest-rs
25+
flags.push("-Dunused".to_owned());
2526
}
2627
if let Ok(sysroot) = env::var("MIRI_SYSROOT") {
2728
flags.push("--sysroot".to_string());

tests/fail/stacked_borrows/issue-miri-1050-1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
fn main() {
44
unsafe {
55
let ptr = Box::into_raw(Box::new(0u16));
6-
Box::from_raw(ptr as *mut u32);
6+
drop(Box::from_raw(ptr as *mut u32));
77
}
88
}

tests/fail/stacked_borrows/issue-miri-1050-1.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
1212
note: inside `main` at $DIR/issue-miri-1050-1.rs:LL:CC
1313
--> $DIR/issue-miri-1050-1.rs:LL:CC
1414
|
15-
LL | Box::from_raw(ptr as *mut u32);
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
LL | drop(Box::from_raw(ptr as *mut u32));
16+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1717

1818
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
1919

tests/fail/stacked_borrows/issue-miri-1050-2.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ use std::ptr::NonNull;
44
fn main() {
55
unsafe {
66
let ptr = NonNull::<i32>::dangling();
7-
Box::from_raw(ptr.as_ptr());
7+
drop(Box::from_raw(ptr.as_ptr()));
88
}
99
}

tests/fail/stacked_borrows/issue-miri-1050-2.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc)
1212
note: inside `main` at $DIR/issue-miri-1050-2.rs:LL:CC
1313
--> $DIR/issue-miri-1050-2.rs:LL:CC
1414
|
15-
LL | Box::from_raw(ptr.as_ptr());
16-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
LL | drop(Box::from_raw(ptr.as_ptr()));
16+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
1717

1818
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
1919

0 commit comments

Comments
 (0)