Merge pull request #302 from RalfJung/mir-validate2

enable a test that waited for a rustc fix
This commit is contained in:
Ralf Jung
2017-08-12 10:11:18 -07:00
committed by GitHub
5 changed files with 5 additions and 7 deletions
+1 -1
View File
@@ -1454,7 +1454,7 @@ pub fn mark_definedness(
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,
-1
View File
@@ -1,5 +1,4 @@
#![allow(unknown_lints)]
#![allow(float_cmp)]
use rustc::ty::layout::HasDataLayout;
+1 -2
View File
@@ -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;
+1 -1
View File
@@ -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 => {},
+2 -2
View File
@@ -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);