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
112 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)];
2021-12-09 17:10:05 +00:00
//~^ ERROR cannot call non-const fn
2015-11-03 09:34:11 +00:00
}