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