rust/tests/ui/consts/return-in-const-fn.rs
2023-01-11 09:32:08 +00:00

11 lines
145 B
Rust

// run-pass
// https://github.com/rust-lang/rust/issues/43754
const fn foo(x: usize) -> usize {
return x;
}
fn main() {
[0; foo(2)];
}