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 03:34:11 -06:00
fn f(x: usize) -> usize {
x
}
fn main() {
let _ = [0; f(2)];
2021-12-09 11:10:05 -06:00
//~^ ERROR cannot call non-const fn
2015-11-03 03:34:11 -06:00
}