mirror of
https://git.proxmox.com/git/rustc
synced 2025-06-03 03:38:47 +00:00
13 lines
236 B
Rust
13 lines
236 B
Rust
fn xyz() -> u8 { 42 }
|
|
|
|
const NUM: u8 = xyz();
|
|
//~^ ERROR cannot call non-const fn
|
|
|
|
fn main() {
|
|
match 1 {
|
|
NUM => unimplemented!(),
|
|
//~^ ERROR could not evaluate constant pattern
|
|
_ => unimplemented!(),
|
|
}
|
|
}
|