rust/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.stderr
CastilloDel 497100a13c Emit an error for unstable attributes that reference already stable features
Add missing error annotations and .stderr file

Acknowledge comments
2024-10-12 10:19:24 +02:00

32 lines
1.5 KiB
Plaintext

error: can't mark as unstable using an already stable feature
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
|
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
LL | const fn my_fun() {}
| -------------------- the stability attribute annotates this item
|
help: consider removing the attribute
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:6:1
|
LL | #[unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: can't mark as unstable using an already stable feature
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this feature is already stable
LL | const fn my_fun() {}
| -------------------- the stability attribute annotates this item
|
help: consider removing the attribute
--> $DIR/unstable-attribute-rejects-already-stable-features.rs:7:1
|
LL | #[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors