]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-43105.rs
Auto merge of #57108 - Mark-Simulacrum:license-remove, r=pietroalbini
[rust.git] / src / test / ui / issues / issue-43105.rs
1 fn xyz() -> u8 { 42 }
2
3 const NUM: u8 = xyz();
4 //~^ ERROR calls in constants are limited to constant functions, tuple structs and tuple variants
5 //~| ERROR any use of this value will cause an error [const_err]
6
7 fn main() {
8     match 1 {
9         NUM => unimplemented!(),
10         //~^ ERROR could not evaluate constant pattern
11         _ => unimplemented!(),
12     }
13 }