]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs
Auto merge of #95454 - randomicon00:fix95444, r=wesleywiser
[rust.git] / src / test / ui / type-alias-impl-trait / type-alias-impl-trait-sized.rs
1 // check-pass
2
3 #![feature(type_alias_impl_trait)]
4
5 type A = impl Sized;
6 fn f1() -> A {
7     0
8 }
9
10 type B = impl ?Sized;
11 fn f2() -> &'static B {
12     &[0]
13 }
14
15 type C = impl ?Sized + 'static;
16 fn f3() -> &'static C {
17     &[0]
18 }
19
20 type D = impl ?Sized;
21 fn f4() -> &'static D {
22     &1
23 }
24
25 fn main() {}