]> git.lizzy.rs Git - rust.git/blob - src/test/ui/stability-attribute/stability-attribute-sanity-4.rs
Auto merge of #103894 - mati865:gnullvm-libunwind-changes, r=thomcc
[rust.git] / src / test / ui / stability-attribute / stability-attribute-sanity-4.rs
1 // Various checks that stability attributes are used correctly, per RFC 507
2
3 #![feature(staged_api)]
4
5 #![stable(feature = "rust1", since = "1.0.0")]
6
7 mod bogus_attribute_types_2 {
8     #[unstable] //~ ERROR malformed `unstable` attribute
9     fn f1() { }
10
11     #[unstable = "b"] //~ ERROR malformed `unstable` attribute
12     fn f2() { }
13
14     #[stable] //~ ERROR malformed `stable` attribute
15     fn f3() { }
16
17     #[stable = "a"] //~ ERROR malformed `stable` attribute
18     fn f4() { }
19
20     #[stable(feature = "a", since = "b")]
21     #[deprecated] //~ ERROR missing 'since'
22     fn f5() { }
23
24     #[stable(feature = "a", since = "b")]
25     #[deprecated = "a"] //~ ERROR missing 'since'
26     fn f6() { }
27 }
28
29 fn main() { }