Skip to content

Commit e8ab64e

Browse files
committed
make unused flags work like they used to
1 parent 9782b7b commit e8ab64e

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

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, 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 & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -152,21 +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-
dword_layout,
158-
&this.tcx,
159-
)?;
155+
let page_size = system_info.offset(field_offsets[2], dword_layout, &this.tcx)?;
160156
this.write_scalar(
161157
Scalar::from_int(PAGE_SIZE, dword_layout.size),
162158
&page_size.into(),
163159
)?;
164160
// Set number of processors.
165-
let num_cpus = system_info.offset(
166-
field_offsets[6],
167-
dword_layout,
168-
&this.tcx,
169-
)?;
161+
let num_cpus = system_info.offset(field_offsets[6], dword_layout, &this.tcx)?;
170162
this.write_scalar(Scalar::from_int(NUM_CPUS, dword_layout.size), &num_cpus.into())?;
171163
}
172164

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());

0 commit comments

Comments
 (0)