]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/control-flow/issue-46843.rs
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / consts / control-flow / issue-46843.rs
1 enum Thing {
2     This,
3     That,
4 }
5
6 fn non_const() -> Thing {
7     Thing::This
8 }
9
10 pub const Q: i32 = match non_const() {
11     //~^ ERROR cannot call non-const fn
12     Thing::This => 1,
13     Thing::That => 0
14 };
15
16 fn main() {}