rust/tests/mir-opt/dont_yeet_assert.rs

12 lines
308 B
Rust
Raw Normal View History

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