]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lint/auxiliary/lint_stability_fields.rs
New upstream version 1.30.0~beta.7+dfsg1
[rustc.git] / src / test / ui / lint / auxiliary / lint_stability_fields.rs
1 // Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 #![feature(staged_api)]
12 #![stable(feature = "rust1", since = "1.0.0")]
13
14 #[stable(feature = "rust1", since = "1.0.0")]
15 pub struct Stable {
16 #[stable(feature = "rust1", since = "1.0.0")]
17 pub inherit: u8, // it's a lie (stable doesn't inherit)
18 #[unstable(feature = "unstable_test_feature", issue = "0")]
19 pub override1: u8,
20 #[rustc_deprecated(since = "1.0.0", reason = "text")]
21 #[unstable(feature = "unstable_test_feature", issue = "0")]
22 pub override2: u8,
23 }
24
25 #[stable(feature = "rust1", since = "1.0.0")]
26 pub struct Stable2(#[stable(feature = "rust1", since = "1.0.0")] pub u8,
27 #[unstable(feature = "unstable_test_feature", issue = "0")] pub u8,
28 #[unstable(feature = "unstable_test_feature", issue = "0")]
29 #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
30
31 #[unstable(feature = "unstable_test_feature", issue = "0")]
32 pub struct Unstable {
33 pub inherit: u8,
34 #[stable(feature = "rust1", since = "1.0.0")]
35 pub override1: u8,
36 #[rustc_deprecated(since = "1.0.0", reason = "text")]
37 #[unstable(feature = "unstable_test_feature", issue = "0")]
38 pub override2: u8,
39 }
40
41 #[unstable(feature = "unstable_test_feature", issue = "0")]
42 pub struct Unstable2(pub u8,
43 #[stable(feature = "rust1", since = "1.0.0")] pub u8,
44 #[unstable(feature = "unstable_test_feature", issue = "0")]
45 #[rustc_deprecated(since = "1.0.0", reason = "text")] pub u8);
46
47 #[unstable(feature = "unstable_test_feature", issue = "0")]
48 #[rustc_deprecated(since = "1.0.0", reason = "text")]
49 pub struct Deprecated {
50 pub inherit: u8,
51 #[stable(feature = "rust1", since = "1.0.0")]
52 pub override1: u8,
53 #[unstable(feature = "unstable_test_feature", issue = "0")]
54 pub override2: u8,
55 }
56
57 #[unstable(feature = "unstable_test_feature", issue = "0")]
58 #[rustc_deprecated(since = "1.0.0", reason = "text")]
59 pub struct Deprecated2(pub u8,
60 #[stable(feature = "rust1", since = "1.0.0")] pub u8,
61 #[unstable(feature = "unstable_test_feature", issue = "0")] pub u8);