Skip to content

Commit 6749794

Browse files
committed
Add test for attribute parser but has unexpected error
1 parent ffa7094 commit 6749794

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

tests/ui/internal/unstable-feature.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#![feature(impl_stability)]
2+
3+
#[allow_unstable_feature] //~ ERROR cannot find attribute `allow_unstable_feature` in this scope
4+
//~^ ERROR `allow_unstable_feature` expects a list of feature names
5+
fn main() {
6+
7+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error: cannot find attribute `allow_unstable_feature` in this scope
2+
--> $DIR/unstable-feature.rs:3:3
3+
|
4+
LL | #[allow_unstable_feature]
5+
| ^^^^^^^^^^^^^^^^^^^^^^
6+
7+
error: `allow_unstable_feature` expects a list of feature names
8+
--> $DIR/unstable-feature.rs:3:1
9+
|
10+
LL | #[allow_unstable_feature]
11+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
12+
13+
error: aborting due to 2 previous errors
14+

0 commit comments

Comments
 (0)