rust/src/test/ui/stability-attribute/stability-attribute-trait-impl.rs

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

30 lines
754 B
Rust
Raw Normal View History

2020-09-10 18:55:04 +00:00
#![feature(staged_api)]
//~^ ERROR module has missing stability attribute
2020-09-10 18:55:04 +00:00
#[stable(feature = "a", since = "1")]
2020-09-10 18:55:04 +00:00
struct StableType;
#[unstable(feature = "b", issue = "none")]
2020-09-10 18:55:04 +00:00
struct UnstableType;
#[stable(feature = "c", since = "1")]
2020-09-10 18:55:04 +00:00
trait StableTrait {}
#[unstable(feature = "d", issue = "none")]
2020-09-10 18:55:04 +00:00
trait UnstableTrait {}
#[unstable(feature = "e", issue = "none")]
2020-09-10 18:55:04 +00:00
impl UnstableTrait for UnstableType {}
#[unstable(feature = "f", issue = "none")]
2020-09-10 18:55:04 +00:00
impl StableTrait for UnstableType {}
#[unstable(feature = "g", issue = "none")]
2020-09-10 18:55:04 +00:00
impl UnstableTrait for StableType {}
#[unstable(feature = "h", issue = "none")]
//~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
2020-09-10 18:55:04 +00:00
impl StableTrait for StableType {}
fn main() {}