]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/extra-const-ub/issue-100771.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / consts / extra-const-ub / issue-100771.rs
CommitLineData
f2b60f7d
FG
1// check-pass
2// compile-flags: -Zextra-const-ub-checks
3
4#[derive(PartialEq, Eq, Copy, Clone)]
5#[repr(packed)]
6struct Foo {
7 field: (i64, u32, u32, u32),
8}
9
10const FOO: Foo = Foo {
11 field: (5, 6, 7, 8),
12};
13
14fn main() {
15 match FOO {
16 Foo { field: (5, 6, 7, 8) } => {},
17 FOO => unreachable!(),
18 _ => unreachable!(),
19 }
20}