]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/control-flow/single_variant_match_ice.rs
Remove unnecessary `const_fn` feature gates
[rust.git] / src / test / ui / consts / control-flow / single_variant_match_ice.rs
1 // check-pass
2
3 #![feature(const_if_match)]
4
5 enum Foo {
6     Prob,
7 }
8
9 const FOO: u32 = match Foo::Prob {
10     Foo::Prob => 42,
11 };
12
13 const BAR: u32 = match Foo::Prob {
14     x => 42,
15 };
16
17 impl Foo {
18     pub const fn as_val(&self) -> u8 {
19         use self::Foo::*;
20
21         match *self {
22             Prob => 0x1,
23         }
24     }
25 }
26
27 fn main() {}