Skip to content

Commit 5d60c61

Browse files
authored
Merge pull request #302 from RalfJung/mir-validate2
enable a test that waited for a rustc fix
2 parents dca1be6 + 7e5d971 commit 5d60c61

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

src/librustc_mir/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> Memory<'a, 'tcx, M> {
14541454
return Ok(());
14551455
}
14561456
let ptr = ptr.to_ptr()?;
1457-
let mut alloc = self.get_mut(ptr.alloc_id)?;
1457+
let alloc = self.get_mut(ptr.alloc_id)?;
14581458
alloc.undef_mask.set_range(
14591459
ptr.offset,
14601460
ptr.offset + size,

src/librustc_mir/interpret/value.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![allow(unknown_lints)]
2-
#![allow(float_cmp)]
32

43
use rustc::ty::layout::HasDataLayout;
54

tests/run-pass-fullmir/integer-ops.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// except according to those terms.
1010

1111
// FIXME: remove -Zmir-opt-level once https://github.com/rust-lang/rust/issues/43359 is fixed
12-
// FIXME: remove -Zmir-emit-validate=0 once https://github.com/rust-lang/rust/pull/43748 is merged
13-
// compile-flags: -Zmir-opt-level=0 -Zmir-emit-validate=0
12+
// compile-flags: -Zmir-opt-level=0
1413

1514
use std::i32;
1615

tests/run-pass/pointers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn tuple_ref_mut() -> (i8, i8) {
3434
fn match_ref_mut() -> i8 {
3535
let mut t = (20, 22);
3636
{
37-
let mut opt = Some(&mut t);
37+
let opt = Some(&mut t);
3838
match opt {
3939
Some(&mut (ref mut x, ref mut y)) => *x += *y,
4040
None => {},

tests/run-pass/thread-local.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ pub fn record(r: usize) {
2929
unsafe { RECORD = RECORD*10 + r };
3030
}
3131

32-
unsafe extern fn dtor(mut ptr: *mut u64) {
32+
unsafe extern fn dtor(ptr: *mut u64) {
3333
assert!(CANNARY != 0 as *mut _); // make sure we do not get run too often
3434
let val = *ptr;
35-
35+
3636
let which_key = GLOBALS.iter().position(|global| global as *const _ == ptr).expect("Should find my global");
3737
record(which_key);
3838

0 commit comments

Comments
 (0)