rust/src/test/ui/unsized-locals/reference-unsized-locals.rs

10 lines
165 B
Rust
Raw Normal View History

// run-pass
#![feature(unsized_locals)]
fn main() {
let foo: Box<[u8]> = Box::new(*b"foo");
let foo: [u8] = *foo;
assert_eq!(&foo, b"foo" as &[u8]);
}