1 // aux-build:lint_stability_fields.rs
4 #![feature(staged_api)]
6 #![stable(feature = "rust1", since = "1.0.0")]
9 extern crate lint_stability_fields;
12 #[stable(feature = "rust1", since = "1.0.0")]
13 pub use super::lint_stability_fields::*;
16 use self::lint_stability_fields::*;
21 override1: 2, //~ ERROR use of unstable
22 override2: 3, //~ ERROR use of unstable
26 let _ = x.override1; //~ ERROR use of unstable
27 let _ = x.override2; //~ ERROR use of unstable
31 override1: _, //~ ERROR use of unstable
32 override2: _ //~ ERROR use of unstable
35 let Stable { .. } = x;
37 let x = Stable2(1, 2, 3);
40 let _ = x.1; //~ ERROR use of unstable
41 let _ = x.2; //~ ERROR use of unstable
44 _, //~ ERROR use of unstable
45 _) //~ ERROR use of unstable
51 let x = Unstable { //~ ERROR use of unstable
52 inherit: 1, //~ ERROR use of unstable
54 override2: 3, //~ ERROR use of unstable
57 let _ = x.inherit; //~ ERROR use of unstable
59 let _ = x.override2; //~ ERROR use of unstable
61 let Unstable { //~ ERROR use of unstable
62 inherit: _, //~ ERROR use of unstable
64 override2: _ //~ ERROR use of unstable
67 let Unstable //~ ERROR use of unstable
68 // the patterns are all fine:
71 // Unstable items are still unstable even when used through a stable "pub use".
72 let x = reexport::Unstable2(1, 2, 3); //~ ERROR use of unstable
74 let x = Unstable2(1, 2, 3); //~ ERROR use of unstable
76 let _ = x.0; //~ ERROR use of unstable
78 let _ = x.2; //~ ERROR use of unstable
80 let Unstable2 //~ ERROR use of unstable
81 (_, //~ ERROR use of unstable
83 _) //~ ERROR use of unstable
85 let Unstable2 //~ ERROR use of unstable
86 // the patterns are all fine:
90 let x = Deprecated { //~ ERROR use of unstable
91 inherit: 1, //~ ERROR use of unstable
93 override2: 3, //~ ERROR use of unstable
96 let _ = x.inherit; //~ ERROR use of unstable
98 let _ = x.override2; //~ ERROR use of unstable
100 let Deprecated { //~ ERROR use of unstable
101 inherit: _, //~ ERROR use of unstable
103 override2: _ //~ ERROR use of unstable
106 let Deprecated //~ ERROR use of unstable
107 // the patterns are all fine:
110 let x = Deprecated2(1, 2, 3); //~ ERROR use of unstable
112 let _ = x.0; //~ ERROR use of unstable
114 let _ = x.2; //~ ERROR use of unstable
116 let Deprecated2 //~ ERROR use of unstable
117 (_, //~ ERROR use of unstable
119 _) //~ ERROR use of unstable
121 let Deprecated2 //~ ERROR use of unstable
122 // the patterns are all fine:
128 #[stable(feature = "rust1", since = "1.0.0")]
131 #[unstable(feature = "unstable_test_feature", issue = "none")]
133 #[rustc_deprecated(since = "1.0.0", reason = "text")]
134 #[unstable(feature = "unstable_test_feature", issue = "none")]
138 #[stable(feature = "rust1", since = "1.0.0")]
140 #[stable(feature = "rust1", since = "1.0.0")] u8,
141 #[unstable(feature = "unstable_test_feature", issue = "none")]
142 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
144 #[unstable(feature = "unstable_test_feature", issue = "none")]
147 #[stable(feature = "rust1", since = "1.0.0")]
149 #[rustc_deprecated(since = "1.0.0", reason = "text")]
150 #[unstable(feature = "unstable_test_feature", issue = "none")]
154 #[unstable(feature = "unstable_test_feature", issue = "none")]
156 #[stable(feature = "rust1", since = "1.0.0")] u8,
157 #[unstable(feature = "unstable_test_feature", issue = "none")]
158 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
160 #[unstable(feature = "unstable_test_feature", issue = "none")]
161 #[rustc_deprecated(since = "1.0.0", reason = "text")]
164 #[stable(feature = "rust1", since = "1.0.0")]
166 #[unstable(feature = "unstable_test_feature", issue = "none")]
170 #[unstable(feature = "unstable_test_feature", issue = "none")]
171 #[rustc_deprecated(since = "1.0.0", reason = "text")]
172 struct Deprecated2(u8,
173 #[stable(feature = "rust1", since = "1.0.0")] u8,
174 #[unstable(feature = "unstable_test_feature", issue = "none")] u8);
193 let Stable { .. } = x;
195 let x = Stable2(1, 2, 3);
226 // the patterns are all fine:
230 let x = Unstable2(1, 2, 3);
242 // the patterns are all fine:
263 // the patterns are all fine:
266 let x = Deprecated2(1, 2, 3);
278 // the patterns are all fine: