Skip to content

Commit b3fcb09

Browse files
committed
Add missing error annotations and .stderr file
1 parent ee15bd5 commit b3fcb09

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

Diff for: tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
#![feature(staged_api)]
55
#![stable(feature = "rust_test", since = "1.0.0")]
66

7-
#[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
8-
#[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
7+
#[unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
8+
#[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
99
const fn my_fun() {}
1010

1111
fn main() {}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
error: can't mark as unstable using an already stable feature
2+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
3+
|
4+
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
6+
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
7+
LL | const fn my_fun() {}
8+
| -------------------- the stability attribute annotates this item
9+
|
10+
help: Consider removing the attribute
11+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
12+
|
13+
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
14+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
16+
error: can't mark as unstable using an already stable feature
17+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:8:1
18+
|
19+
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
20+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
21+
LL | const fn my_fun() {}
22+
| -------------------- the stability attribute annotates this item
23+
|
24+
help: Consider removing the attribute
25+
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:8:1
26+
|
27+
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
28+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
30+
error: aborting due to 2 previous errors
31+

0 commit comments

Comments
 (0)