]> git.lizzy.rs Git - rust.git/blob - tests/ui/consts/issue-43105.rs
Rollup merge of #106717 - klensy:typo, r=lcnr
[rust.git] / tests / 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 }