about summary refs log tree commit diff
path: root/tests/ui/impl-trait/unsize_adt.rs
blob: 825384b61e87ae37ff8ffa16c59311fb8699d711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Test that we allow unsizing `Foo<[Opaque; N]>` to `Foo<[Concrete]>`.

//@check-pass

struct Foo<T: ?Sized>(T);

fn hello() -> Foo<[impl Sized; 2]> {
    if false {
        let x = hello();
        let _: &Foo<[i32]> = &x;
    }
    todo!()
}

fn main() {}