rust/tests/ui/consts/let-irrefutable-pattern-ice-120337.rs
2024-02-16 20:02:50 +00:00

11 lines
200 B
Rust

//@ check-pass
#![feature(never_type)]
#[derive(Copy, Clone)]
pub enum E { A(!), }
pub union U { u: (), e: E, }
pub const C: () = {
let E::A(ref a) = unsafe { &(&U { u: () }).e};
};
fn main() {}