summaryrefslogtreecommitdiffstats
path: root/tests/mir-opt/dont_yeet_assert.rs
blob: 7cec761eabac1d7c79ddd77b081f9c6ba9bb7738 (plain)
1
2
3
4
5
6
7
8
9
10
11
// compile-flags: --crate-type=lib
// unit-test: InstCombine

#![feature(core_intrinsics)]

// Want to make sure this assertion isn't compiled away in generic code.

// EMIT_MIR dont_yeet_assert.generic.InstCombine.diff
pub fn generic<T>() {
    core::intrinsics::assert_mem_uninitialized_valid::<&T>();
}