2018-05-29 00:12:55 +09:00
|
|
|
fn main() {
|
|
|
|
|
let foo: Box<[u8]> = Box::new(*b"foo");
|
2025-06-13 01:16:36 +02:00
|
|
|
let foo: [u8] = *foo; //~ERROR the size for values of type `[u8]` cannot be known at compilation time [E0277]
|
2018-05-29 00:12:55 +09:00
|
|
|
assert_eq!(&foo, b"foo" as &[u8]);
|
|
|
|
|
}
|