about summary refs log tree commit diff
path: root/src/tools/miri/tests/pass/issues/issue-120337-irrefutable-let-ice.rs
blob: 5af0d0e4bbd95a1fff8cea61be8df7957c904712 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Validation stops the test before the ICE we used to hit
//@compile-flags: -Zmiri-disable-validation

#![feature(never_type)]
#[derive(Copy, Clone)]
pub enum E {
    A(!),
}
pub union U {
    u: (),
    e: E,
}

fn main() {
    let E::A(ref _a) = unsafe { &(&U { u: () }).e };
}