Files
rust/tests/ui/consts/issue-43105.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
231 B
Rust
Raw Normal View History

fn xyz() -> u8 { 42 }
const NUM: u8 = xyz();
2024-12-23 21:49:48 +00:00
//~^ ERROR cannot call non-const function
fn main() {
match 1 {
NUM => unimplemented!(), // ok, the `const` already emitted an error
_ => unimplemented!(),
}
}