rust/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs
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

11 lines
450 B
Rust

//! Ensure #[unstable] doesn't accept already stable features
#![feature(staged_api)]
#![stable(feature = "rust_test", since = "1.0.0")]
#[unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
#[rustc_const_unstable(feature = "arbitrary_enum_discriminant", issue = "42")] //~ ERROR can't mark as unstable using an already stable feature
const fn my_fun() {}
fn main() {}