]> git.proxmox.com Git - rustc.git/blame - src/test/ui/consts/control-flow/issue-46843.rs
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / consts / control-flow / issue-46843.rs
CommitLineData
f035d41b
XL
1enum Thing {
2 This,
3 That,
4}
60c5eb7d
XL
5
6fn non_const() -> Thing {
7 Thing::This
8}
9
10pub const Q: i32 = match non_const() {
5099ac24 11 //~^ ERROR cannot call non-const fn
60c5eb7d
XL
12 Thing::This => 1,
13 Thing::That => 0
14};
15
16fn main() {}