about summary refs log tree commit diff
path: root/tests/ui/union/union-const-eval.rs
blob: 37def9320be630373f0515cd959e0d2d12720844 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
//@ check-pass

union U {
    a: usize,
    b: usize,
}

const C: U = U { a: 10 };

fn main() {
    let a: [u8; unsafe { C.a }];
    let b: [u8; unsafe { C.b }];
}