summaryrefslogtreecommitdiffstats
path: root/tests/ui/unsized-locals/rust-call.rs
blob: ff4075aa4c03cc329ffbebac93bed36d877d02c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#![feature(unsized_tuple_coercion)]
#![feature(unboxed_closures)]
#![feature(unsized_fn_params)]

fn bad() -> extern "rust-call" fn(([u8],)) { todo!() }

fn main() {
    let f = bad();
    let slice: Box<([u8],)> = Box::new(([1; 8],));
    f(*slice);
    //~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
}