blob: ddddc8505c635102ec743013828870f80be4d7ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
enum Thing {
This,
That,
}
fn non_const() -> Thing {
Thing::This
}
pub const Q: i32 = match non_const() {
//~^ ERROR cannot call non-const fn
Thing::This => 1,
Thing::That => 0
};
fn main() {}
|