Skip to content

Commit

Permalink
Merge pull request rust-lang#302 from RalfJung/mir-validate2
Browse files Browse the repository at this point in the history
enable a test that waited for a rustc fix
  • Loading branch information
RalfJung authored Aug 12, 2017
2 parents dca1be6 + 7e5d971 commit 5d60c61
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/librustc_mir/interpret/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_mir/interpret/value.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![allow(unknown_lints)]
#![allow(float_cmp)]

use rustc::ty::layout::HasDataLayout;

Expand Down
3 changes: 1 addition & 2 deletions tests/run-pass-fullmir/integer-ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/run-pass/pointers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {},
Expand Down
4 changes: 2 additions & 2 deletions tests/run-pass/thread-local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5d60c61

Please sign in to comment.