We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9880846 + 1620159 commit c5055b7Copy full SHA for c5055b7
src/test/ui/type-alias-impl-trait/issue-65384.rs
@@ -0,0 +1,16 @@
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() {}
src/test/ui/type-alias-impl-trait/issue-65384.stderr
@@ -0,0 +1,14 @@
+error: cannot implement trait on type alias impl trait
+ --> $DIR/issue-65384.rs:11:1
+ |
+LL | impl MyTrait for Bar {}
+ | ^^^^^^^^^^^^^^^^^^^^
+note: type alias impl trait defined here
+ --> $DIR/issue-65384.rs:9:12
+LL | type Bar = impl MyTrait;
+ | ^^^^^^^^^^^^
+error: aborting due to previous error
0 commit comments