]> git.lizzy.rs Git - rust.git/blob - src/test/ui/type-alias-impl-trait/type-alias-impl-trait-sized.rs
Loop over all opaque types instead of looking at just the first one with the same...
[rust.git] / src / test / ui / type-alias-impl-trait / type-alias-impl-trait-sized.rs
1 // check-pass
2
3 // revisions: min_tait full_tait
4 #![feature(min_type_alias_impl_trait)]
5 #![cfg_attr(full_tait, feature(type_alias_impl_trait))]
6 //[full_tait]~^ WARN incomplete
7
8 type A = impl Sized;
9 fn f1() -> A { 0 }
10
11 type B = impl ?Sized;
12 fn f2() -> &'static B { &[0] }
13
14 type C = impl ?Sized + 'static;
15 fn f3() -> &'static C { &[0] }
16
17 type D = impl ?Sized;
18 fn f4() -> &'static D { &1 }
19
20 fn main() {}