1 // Validation makes this fail in the wrong place
2 // Make sure we find these even with many checks disabled.
3 //@compile-flags: -Zmiri-disable-alignment-check -Zmiri-disable-stacked-borrows -Zmiri-disable-validation
16 let f = unsafe { std::mem::transmute::<i32, Foo>(42) };
17 let _val = mem::discriminant(&f); //~ERROR: enum value has invalid tag