rust/tests/ui/unstable-feature-bound/unstable_feature_bound_incompatible_stability.rs

15 lines
399 B
Rust

#![allow(internal_features)]
#![feature(staged_api)]
#![allow(dead_code)]
#![stable(feature = "a", since = "1.1.1" )]
// Lint against the usage of both #[unstable_feature_bound] and #[stable] on the
// same item.
#[stable(feature = "a", since = "1.1.1")]
#[unstable_feature_bound(feat_bar)]
fn bar() {}
//~^ ERROR Item annotated with `#[unstable_feature_bound]` should not be stable
fn main() {}