rust/tests/ui/consts/min_const_fn/bad_const_fn_body_ice.rs

8 lines
152 B
Rust

const fn foo(a: i32) -> Vec<i32> {
vec![1, 2, 3]
//~^ ERROR allocations are not allowed
//~| ERROR cannot call non-const fn
}
fn main() {}