]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/packed_pattern.rs
Move /src/test to /tests
[rust.git] / tests / 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!(), //~ WARNING unreachable pattern
17         _ => unreachable!(),
18     }
19 }