]> git.proxmox.com Git - rustc.git/blob - src/test/ui/consts/issue-43105.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / consts / issue-43105.rs
1 fn xyz() -> u8 { 42 }
2
3 const NUM: u8 = xyz();
4 //~^ ERROR cannot call non-const fn
5
6 fn main() {
7 match 1 {
8 NUM => unimplemented!(),
9 //~^ ERROR could not evaluate constant pattern
10 //~| ERROR could not evaluate constant pattern
11 _ => unimplemented!(),
12 }
13 }