]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/control-flow/single_variant_match_ice.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / consts / control-flow / single_variant_match_ice.rs
1 // check-pass
2
3 enum Foo {
4 Prob,
5 }
6
7 const FOO: u32 = match Foo::Prob {
8 Foo::Prob => 42,
9 };
10
11 const BAR: u32 = match Foo::Prob {
12 x => 42,
13 };
14
15 impl Foo {
16 pub const fn as_val(&self) -> u8 {
17 use self::Foo::*;
18
19 match *self {
20 Prob => 0x1,
21 }
22 }
23 }
24
25 fn main() {}