File tree Expand file tree Collapse file tree 2 files changed +30
-0
lines changed
src/test/ui/type-alias-impl-trait Expand file tree Collapse file tree 2 files changed +30
-0
lines changed Original file line number Diff line number Diff line change
1
+ #![ feature( min_type_alias_impl_trait) ]
2
+ #![ feature( type_alias_impl_trait) ]
3
+ #![ allow( incomplete_features) ]
4
+
5
+ trait MyTrait { }
6
+
7
+ impl MyTrait for ( ) { }
8
+
9
+ type Bar = impl MyTrait ;
10
+
11
+ impl MyTrait for Bar { }
12
+ //~^ ERROR: cannot implement trait on type alias impl trait
13
+
14
+ fn bazr ( ) -> Bar { }
15
+
16
+ fn main ( ) { }
Original file line number Diff line number Diff line change
1
+ error: cannot implement trait on type alias impl trait
2
+ --> $DIR/issue-65384.rs:11:1
3
+ |
4
+ LL | impl MyTrait for Bar {}
5
+ | ^^^^^^^^^^^^^^^^^^^^
6
+ |
7
+ note: type alias impl trait defined here
8
+ --> $DIR/issue-65384.rs:9:12
9
+ |
10
+ LL | type Bar = impl MyTrait;
11
+ | ^^^^^^^^^^^^
12
+
13
+ error: aborting due to previous error
14
+
You can’t perform that action at this time.
0 commit comments