rust/tests/ui/consts/return-in-const-fn.rs

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

11 lines
145 B
Rust
Raw Normal View History

// run-pass
2018-01-16 03:15:41 -06:00
// https://github.com/rust-lang/rust/issues/43754
const fn foo(x: usize) -> usize {
return x;
}
fn main() {
[0; foo(2)];
}