mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-02 18:27:37 +00:00
6 lines
211 B
Rust
6 lines
211 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]
|
|
assert_eq!(&foo, b"foo" as &[u8]);
|
|
}
|