rust/tests/ui/unsized-locals/simple-unsized-locals.rs
2025-06-13 01:16:36 +02:00

5 lines
173 B
Rust

fn main() {
let foo: Box<[u8]> = Box::new(*b"foo");
let _foo: [u8] = *foo; //~ERROR the size for values of type `[u8]` cannot be known at compilation time [E0277]
}