Skip to content

Commit 370f1f2

Browse files
author
Alexander Regueiro
committed
Added tests.
1 parent aafbf74 commit 370f1f2

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(trait_alias)]
2+
3+
trait Foo {}
4+
auto trait A = Foo; //~ ERROR trait aliases cannot be `auto`
5+
unsafe trait B = Foo; //~ ERROR trait aliases cannot be `unsafe`
6+
7+
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: trait aliases cannot be `auto`
2+
--> $DIR/trait-alias-syntax.rs:4:19
3+
|
4+
LL | auto trait A = Foo; //~ ERROR trait aliases cannot be `auto`
5+
| ^ trait aliases cannot be `auto`
6+
7+
error: trait aliases cannot be `unsafe`
8+
--> $DIR/trait-alias-syntax.rs:5:21
9+
|
10+
LL | unsafe trait B = Foo; //~ ERROR trait aliases cannot be `unsafe`
11+
| ^ trait aliases cannot be `unsafe`
12+
13+
error: aborting due to 2 previous errors
14+

0 commit comments

Comments
 (0)