summaryrefslogtreecommitdiffstats
path: root/tests/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs
blob: c5e8068e5c8e90776d8a536eeff821694a9239ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// check-pass

#![feature(type_alias_impl_trait)]

type A = impl Sized;
fn f1() -> A {
    0
}

type B = impl ?Sized;
fn f2() -> &'static B {
    &[0]
}

type C = impl ?Sized + 'static;
fn f3() -> &'static C {
    &[0]
}

type D = impl ?Sized;
fn f4() -> &'static D {
    &1
}

fn main() {}