File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
src/test/ui/type-alias-impl-trait Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change 1- trait Mirror < ' a > {
2- type Item ;
3- }
1+ #![ feature( type_alias_impl_trait) ]
2+
3+ // known-bug: #99840
4+ // this should not compile
5+ // check-pass
6+
7+ type Alias = impl Sized ;
48
5- impl < ' a , T > Mirror < ' a > for T {
6- type Item = T ;
9+ fn constrain ( ) -> Alias {
10+ 1i32
711}
812
9- trait AnotherTrait {
10- type Blah ;
13+ trait HideIt {
14+ type Assoc ;
1115}
1216
13- impl < ' a > AnotherTrait for <u32 as Mirror < ' a > >:: Item {
14- //~^ ERROR: the lifetime parameter `'a` is not constrained
15- type Blah = & ' a u32 ;
17+ impl HideIt for ( ) {
18+ type Assoc = Alias ;
1619}
1720
21+ pub trait Yay { }
22+
23+ impl Yay for <( ) as HideIt >:: Assoc { }
24+ // impl Yay for i32 {} // this already errors
25+ // impl Yay for u32 {} // this also already errors
26+
1827fn main ( ) { }
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments