blob: 79dde3c18e8fa995ed58414fb85beb8dec9a39b1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
enum Foo {
Prob,
}
const FOO: u32 = match Foo::Prob {
Foo::Prob => 42, //~ ERROR unimplemented expression type
};
const BAR: u32 = match Foo::Prob {
x => 42, //~ ERROR unimplemented expression type
};
impl Foo {
pub const fn as_val(&self) -> u8 {
use self::Foo::*;
match *self {
Prob => 0x1, //~ ERROR `if`, `match`, `&&` and `||` are not stable in const fn
}
}
}
fn main() {}
|