1 #![allow(deprecated, invalid_value)]
2 // This test is adapted from https://github.com/rust-lang/miri/issues/1340#issue-600900312.
5 // Deliberately using `mem::uninitialized` to make sure that despite all the mitigations, we consider this UB.
6 // The array avoids a `Scalar` layout which detects uninit without even doing validation.
7 let _val: [f32; 1] = unsafe { std::mem::uninitialized() };
8 //~^ ERROR: uninitialized