rust/tests/mir-opt/dont_yeet_assert.rs
2023-05-06 23:22:32 -04:00

12 lines
308 B
Rust

// compile-flags: --crate-type=lib
// unit-test: InstSimplify
#![feature(core_intrinsics)]
// Want to make sure this assertion isn't compiled away in generic code.
// EMIT_MIR dont_yeet_assert.generic.InstSimplify.diff
pub fn generic<T>() {
core::intrinsics::assert_mem_uninitialized_valid::<&T>();
}