]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/packed_pattern.rs
Rollup merge of #64603 - gilescope:unused-lifetime-warning, r=matthewjasper
[rust.git] / src / test / ui / consts / packed_pattern.rs
1 // run-pass
2
3 #[derive(PartialEq, Eq, Copy, Clone)]
4 #[repr(packed)]
5 struct Foo {
6     field: (i64, u32, u32, u32),
7 }
8
9 const FOO: Foo = Foo {
10     field: (5, 6, 7, 8),
11 };
12
13 fn main() {
14     match FOO {
15         Foo { field: (5, 6, 7, 8) } => {},
16         FOO => unreachable!(),
17         _ => unreachable!(),
18     }
19 }