rust/tests/ui/consts/const-call.rs

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

9 lines
118 B
Rust
Raw Normal View History

2015-11-03 09:34:11 +00:00
fn f(x: usize) -> usize {
x
}
fn main() {
let _ = [0; f(2)];
2024-12-23 21:49:48 +00:00
//~^ ERROR cannot call non-const function
2015-11-03 09:34:11 +00:00
}