+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
fn main() {
let b = Box::new(42);
let g = unsafe {
+// 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)
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
#![feature(box_syntax)]
fn main() {
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
use std::mem;
fn f() {}
+// Validation makes this fail in the wrong place
+// compile-flags: -Zmir-emit-validate=0
+
#[repr(C)]
pub enum Foo {
A, B, C, D
+// 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;
+// 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)]