9 lines
332 B
Rust
9 lines
332 B
Rust
#![allow(deprecated)]
|
|
// This test is adapted from https://github.com/rust-lang/miri/issues/1340#issue-600900312.
|
|
|
|
fn main() {
|
|
// Deliberately using `mem::uninitialized` to make sure that despite all the mitigations, we consider this UB.
|
|
let _val: f32 = unsafe { std::mem::uninitialized() };
|
|
//~^ ERROR: uninitialized
|
|
}
|