This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed
src/test/ui/stability-attribute Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #![ feature( staged_api) ]
2+
3+ #[ stable( feature = "x" , since = "1" ) ]
4+ struct StableType ;
5+
6+ #[ unstable( feature = "x" , issue = "none" ) ]
7+ struct UnstableType ;
8+
9+ #[ stable( feature = "x" , since = "1" ) ]
10+ trait StableTrait { }
11+
12+ #[ unstable( feature = "x" , issue = "none" ) ]
13+ trait UnstableTrait { }
14+
15+ #[ unstable( feature = "x" , issue = "none" ) ]
16+ impl UnstableTrait for UnstableType { }
17+
18+ #[ unstable( feature = "x" , issue = "none" ) ]
19+ impl StableTrait for UnstableType { }
20+
21+ #[ unstable( feature = "x" , issue = "none" ) ]
22+ impl UnstableTrait for StableType { }
23+
24+ #[ unstable( feature = "x" , issue = "none" ) ]
25+ //~^ ERROR An `#[unstable]` annotation here has no effect.
26+ impl StableTrait for StableType { }
27+
28+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ error: An `#[unstable]` annotation here has no effect. See issue #55436 <https://github.com/rust-lang/rust/issues/55436> for more information.
2+ --> $DIR/stability-attribute-trait-impl.rs:24:1
3+ |
4+ LL | #[unstable(feature = "x", issue = "none")]
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: `#[deny(rustc::ineffective_unstable_trait_impl)]` on by default
8+
9+ error: aborting due to previous error
10+
You can’t perform that action at this time.
0 commit comments