rust/tests/ui/feature-gates/unstable-attribute-rejects-already-stable-features.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
450 B
Rust
Raw Normal View History

//! 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() {}