Skip to content

Commit c5055b7

Browse files
authored
Rollup merge of #86688 - JohnTitor:test-65384, r=jackh726
Add a regression test for issue-65384 Closes #65384 r? `@jackh726`
2 parents 9880846 + 1620159 commit c5055b7

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -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() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+

0 commit comments

Comments
 (0)