rust/tests/ui/consts/return-in-const-fn.rs
2024-02-16 20:02:50 +00:00

11 lines
146 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)];
}