1 // aux-build:lint_stability_fields.rs
5 #![feature(staged_api, unstable_test_feature)]
7 #![stable(feature = "rust1", since = "1.0.0")]
10 extern crate lint_stability_fields;
12 use self::lint_stability_fields::*;
19 //~^ ERROR use of deprecated item
25 //~^ ERROR use of deprecated item
31 //~^ ERROR use of deprecated item
34 let Stable { .. } = x;
36 let x = Stable2(1, 2, 3);
41 //~^ ERROR use of deprecated item
46 //~^ ERROR use of deprecated item
56 //~^ ERROR use of deprecated item
62 //~^ ERROR use of deprecated item
68 //~^ ERROR use of deprecated item
72 // the patterns are all fine:
76 let x = Unstable2(1, 2, 3);
81 //~^ ERROR use of deprecated item
87 //~^ ERROR use of deprecated item
90 // the patterns are all fine:
95 //~^ ERROR use of deprecated item
97 //~^ ERROR use of deprecated item
99 //~^ ERROR use of deprecated item
101 //~^ ERROR use of deprecated item
105 //~^ ERROR use of deprecated item
107 //~^ ERROR use of deprecated item
109 //~^ ERROR use of deprecated item
112 //~^ ERROR use of deprecated item
114 //~^ ERROR use of deprecated item
116 //~^ ERROR use of deprecated item
118 //~^ ERROR use of deprecated item
122 //~^ ERROR use of deprecated item
123 // the patterns are all fine:
126 let x = Deprecated2(1, 2, 3);
127 //~^ ERROR use of deprecated item
130 //~^ ERROR use of deprecated item
132 //~^ ERROR use of deprecated item
134 //~^ ERROR use of deprecated item
137 //~^ ERROR use of deprecated item
139 //~^ ERROR use of deprecated item
141 //~^ ERROR use of deprecated item
143 //~^ ERROR use of deprecated item
146 //~^ ERROR use of deprecated item
147 // the patterns are all fine:
153 #[stable(feature = "rust1", since = "1.0.0")]
156 #[unstable(feature = "unstable_test_feature", issue = "none")]
158 #[rustc_deprecated(since = "1.0.0", reason = "text")]
159 #[unstable(feature = "unstable_test_feature", issue = "none")]
163 #[stable(feature = "rust1", since = "1.0.0")]
165 #[stable(feature = "rust1", since = "1.0.0")] u8,
166 #[unstable(feature = "unstable_test_feature", issue = "none")]
167 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
169 #[unstable(feature = "unstable_test_feature", issue = "none")]
172 #[stable(feature = "rust1", since = "1.0.0")]
174 #[rustc_deprecated(since = "1.0.0", reason = "text")]
175 #[unstable(feature = "unstable_test_feature", issue = "none")]
179 #[unstable(feature = "unstable_test_feature", issue = "none")]
181 #[stable(feature = "rust1", since = "1.0.0")] u8,
182 #[unstable(feature = "unstable_test_feature", issue = "none")]
183 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
185 #[unstable(feature = "unstable_test_feature", issue = "none")]
186 #[rustc_deprecated(since = "1.0.0", reason = "text")]
189 #[stable(feature = "rust1", since = "1.0.0")]
191 #[unstable(feature = "unstable_test_feature", issue = "none")]
195 #[unstable(feature = "unstable_test_feature", issue = "none")]
196 #[rustc_deprecated(since = "1.0.0", reason = "text")]
197 struct Deprecated2(u8,
198 #[stable(feature = "rust1", since = "1.0.0")] u8,
199 #[unstable(feature = "unstable_test_feature", issue = "none")] u8);
206 //~^ ERROR use of deprecated item
212 //~^ ERROR use of deprecated item
218 //~^ ERROR use of deprecated item
221 let Stable { .. } = x;
223 let x = Stable2(1, 2, 3);
228 //~^ ERROR use of deprecated item
233 //~^ ERROR use of deprecated item
243 //~^ ERROR use of deprecated item
249 //~^ ERROR use of deprecated item
255 //~^ ERROR use of deprecated item
259 // the patterns are all fine:
263 let x = Unstable2(1, 2, 3);
268 //~^ ERROR use of deprecated item
274 //~^ ERROR use of deprecated item
277 // the patterns are all fine:
282 //~^ ERROR use of deprecated item
284 //~^ ERROR use of deprecated item
286 //~^ ERROR use of deprecated item
288 //~^ ERROR use of deprecated item
292 //~^ ERROR use of deprecated item
294 //~^ ERROR use of deprecated item
296 //~^ ERROR use of deprecated item
299 //~^ ERROR use of deprecated item
301 //~^ ERROR use of deprecated item
303 //~^ ERROR use of deprecated item
305 //~^ ERROR use of deprecated item
309 //~^ ERROR use of deprecated item
310 // the patterns are all fine:
313 let x = Deprecated2(1, 2, 3);
314 //~^ ERROR use of deprecated item
317 //~^ ERROR use of deprecated item
319 //~^ ERROR use of deprecated item
321 //~^ ERROR use of deprecated item
324 //~^ ERROR use of deprecated item
326 //~^ ERROR use of deprecated item
328 //~^ ERROR use of deprecated item
330 //~^ ERROR use of deprecated item
333 //~^ ERROR use of deprecated item
334 // the patterns are all fine: