summary refs log tree commit diff
path: root/tests/ui/impl-trait/unsize_slice.rs
blob: ec0f162656400cd6ce18415863281caf6ddf38c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//! Test that we do not allow unsizing `[Opaque; N]` to `[Concrete]`.

fn hello() -> [impl Sized; 2] {
    if false {
        let x = hello();
        let _: &[i32] = &x;
        //~^ ERROR: mismatched types
    }
    todo!()
}

fn main() {}