]> git.lizzy.rs Git - rust.git/commitdiff
selectively disable validation in compile-fail where appropriate. cargo test now...
authorRalf Jung <post@ralfj.de>
Wed, 2 Aug 2017 22:35:44 +0000 (15:35 -0700)
committerRalf Jung <post@ralfj.de>
Fri, 4 Aug 2017 01:13:23 +0000 (18:13 -0700)
tests/compile-fail/cast_box_int_to_fn_ptr.rs
tests/compile-fail/cast_int_to_fn_ptr.rs
tests/compile-fail/execute_memory.rs
tests/compile-fail/fn_ptr_offset.rs
tests/compile-fail/invalid_enum_discriminant.rs
tests/compile-fail/memleak_rc.rs
tests/compile-fail/static_memory_modification2.rs

index 96469814be29b04c198e5b46548131bdc6ad4049..912b1bd7d91f26ea2118a2eb8cabcb70ac16b1d3 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
 fn main() {
     let b = Box::new(42);
     let g = unsafe {
index 28d56a2cb6271815f85b332888a2b870eed930d0..23f85dbaf3ecbfd8715b50478e8d88ce63dc7e63 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
 fn main() {
     let g = unsafe {
         std::mem::transmute::<usize, fn(i32)>(42)
index 8d3c9df0320ba24e53a707cb1457ceacf5b8fa55..87d975e1f9d486ab389b00f8ab4906145076541c 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
 #![feature(box_syntax)]
 
 fn main() {
index 2d240b6a55ade8ae223a1fa16cc5e5fa573a874c..3e4c5d6ad391651daac0027cbe37f975ceb06d1a 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
 use std::mem;
 
 fn f() {}
index bde78200b3c47a92dc601b2b1939eff6a9500512..9ce6d44ca460ff356dc0effbf20919fb43aaf653 100644 (file)
@@ -1,3 +1,6 @@
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
 #[repr(C)]
 pub enum Foo {
     A, B, C, D
index b2bc6722afb04fd22c6a0bc4b546ecab3fe1e5ac..ee245daa310694c3a58f45aa1ebbcdb5b5ab4fba 100644 (file)
@@ -1,3 +1,6 @@
+// FIXME: Due to https://github.com/rust-lang/rust/issues/43457 we have to disable validation
+// compile-flags: -Zmir-emit-validate=0
+
 //error-pattern: the evaluated program leaked memory
 
 use std::rc::Rc;
index 89d69cf7d7f4b3d99adee01ea621564885281c61..f030a9c281de7fff0b1501b0a21fb3a81c289f62 100644 (file)
@@ -1,3 +1,6 @@
+// Validation detects that we are casting & to &mut and so it changes why we fail
+// compile-flags: -Zmir-emit-validate=0
+
 use std::mem::transmute;
 
 #[allow(mutable_transmutes)]