about summary refs log tree commit diff
path: root/tests/ui/unsized-locals/reference-unsized-locals.rs
blob: 757bae4bb914dfbcc24fea764eec250aeed96cf9 (plain)
1
2
3
4
5
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]);
}