]> git.proxmox.com Git - rustc.git/blob - src/test/ui/stability-attribute/stability-attribute-trait-impl.rs
New upstream version 1.51.0+dfsg1
[rustc.git] / src / test / ui / stability-attribute / stability-attribute-trait-impl.rs
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 [ineffective_unstable_trait_impl]
26 impl StableTrait for StableType {}
27
28 fn main() {}