diff options
| author | Ralf Jung <post@ralfj.de> | 2017-08-12 10:11:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-12 10:11:18 -0700 |
| commit | 5d60c614e644cda97758bba5eaa6feb6b0dc5854 (patch) | |
| tree | 5fb39eaa2a0e3ae2c948ccfa2251960d8974ef9f | |
| parent | dca1be68ffd210b8e5fd75ece221f2733eb9991a (diff) | |
| parent | 7e5d971c56f22f94a27bf87a307cfa191e7c98f5 (diff) | |
| download | rust-5d60c614e644cda97758bba5eaa6feb6b0dc5854.tar.gz rust-5d60c614e644cda97758bba5eaa6feb6b0dc5854.zip | |
Merge pull request #302 from RalfJung/mir-validate2
enable a test that waited for a rustc fix
| -rw-r--r-- | src/librustc_mir/interpret/memory.rs | 2 | ||||
| -rw-r--r-- | src/librustc_mir/interpret/value.rs | 1 | ||||
| -rw-r--r-- | tests/run-pass-fullmir/integer-ops.rs | 3 | ||||
| -rw-r--r-- | tests/run-pass/pointers.rs | 2 | ||||
| -rw-r--r-- | tests/run-pass/thread-local.rs | 4 |
5 files changed, 5 insertions, 7 deletions
diff --git a/src/librustc_mir/interpret/memory.rs b/src/librustc_mir/interpret/memory.rs index 56c051dcfad..9930555c199 100644 --- a/src/librustc_mir/interpret/memory.rs +++ b/src/librustc_mir/interpret/memory.rs @@ -1454,7 +1454,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> Memory<'a, 'tcx, M> { return Ok(()); } let ptr = ptr.to_ptr()?; - let mut alloc = self.get_mut(ptr.alloc_id)?; + let alloc = self.get_mut(ptr.alloc_id)?; alloc.undef_mask.set_range( ptr.offset, ptr.offset + size, diff --git a/src/librustc_mir/interpret/value.rs b/src/librustc_mir/interpret/value.rs index 8424e72fef0..8abb0b86bf8 100644 --- a/src/librustc_mir/interpret/value.rs +++ b/src/librustc_mir/interpret/value.rs @@ -1,5 +1,4 @@ #![allow(unknown_lints)] -#![allow(float_cmp)] use rustc::ty::layout::HasDataLayout; diff --git a/tests/run-pass-fullmir/integer-ops.rs b/tests/run-pass-fullmir/integer-ops.rs index 44030c3301c..e761cdd6237 100644 --- a/tests/run-pass-fullmir/integer-ops.rs +++ b/tests/run-pass-fullmir/integer-ops.rs @@ -9,8 +9,7 @@ // except according to those terms. // FIXME: remove -Zmir-opt-level once https://github.com/rust-lang/rust/issues/43359 is fixed -// FIXME: remove -Zmir-emit-validate=0 once https://github.com/rust-lang/rust/pull/43748 is merged -// compile-flags: -Zmir-opt-level=0 -Zmir-emit-validate=0 +// compile-flags: -Zmir-opt-level=0 use std::i32; diff --git a/tests/run-pass/pointers.rs b/tests/run-pass/pointers.rs index 2ef7eb0102f..f3ae3ab913a 100644 --- a/tests/run-pass/pointers.rs +++ b/tests/run-pass/pointers.rs @@ -34,7 +34,7 @@ fn tuple_ref_mut() -> (i8, i8) { fn match_ref_mut() -> i8 { let mut t = (20, 22); { - let mut opt = Some(&mut t); + let opt = Some(&mut t); match opt { Some(&mut (ref mut x, ref mut y)) => *x += *y, None => {}, diff --git a/tests/run-pass/thread-local.rs b/tests/run-pass/thread-local.rs index 34aeef23b1a..db00e42d99a 100644 --- a/tests/run-pass/thread-local.rs +++ b/tests/run-pass/thread-local.rs @@ -29,10 +29,10 @@ pub fn record(r: usize) { unsafe { RECORD = RECORD*10 + r }; } -unsafe extern fn dtor(mut ptr: *mut u64) { +unsafe extern fn dtor(ptr: *mut u64) { assert!(CANNARY != 0 as *mut _); // make sure we do not get run too often let val = *ptr; - + let which_key = GLOBALS.iter().position(|global| global as *const _ == ptr).expect("Should find my global"); record(which_key); |
