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.
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.
11 // aux-build:lint_stability_fields.rs
14 #![feature(staged_api, test_feature)]
16 #![stable(feature = "rust1", since = "1.0.0")]
19 extern crate lint_stability_fields;
21 use self::lint_stability_fields::*;
28 //~^ ERROR use of deprecated item
34 //~^ ERROR use of deprecated item
40 //~^ ERROR use of deprecated item
43 let Stable { .. } = x;
45 let x = Stable2(1, 2, 3);
50 //~^ ERROR use of deprecated item
55 //~^ ERROR use of deprecated item
65 //~^ ERROR use of deprecated item
71 //~^ ERROR use of deprecated item
77 //~^ ERROR use of deprecated item
81 // the patterns are all fine:
85 let x = Unstable2(1, 2, 3);
90 //~^ ERROR use of deprecated item
96 //~^ ERROR use of deprecated item
99 // the patterns are all fine:
104 //~^ ERROR use of deprecated item
106 //~^ ERROR use of deprecated item
108 //~^ ERROR use of deprecated item
110 //~^ ERROR use of deprecated item
114 //~^ ERROR use of deprecated item
116 //~^ ERROR use of deprecated item
118 //~^ ERROR use of deprecated item
121 //~^ ERROR use of deprecated item
123 //~^ ERROR use of deprecated item
125 //~^ ERROR use of deprecated item
127 //~^ ERROR use of deprecated item
131 //~^ ERROR use of deprecated item
132 // the patterns are all fine:
135 let x = Deprecated2(1, 2, 3);
136 //~^ 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
148 //~^ ERROR use of deprecated item
150 //~^ ERROR use of deprecated item
152 //~^ ERROR use of deprecated item
155 //~^ ERROR use of deprecated item
156 // the patterns are all fine:
162 #[stable(feature = "rust1", since = "1.0.0")]
165 #[unstable(feature = "test_feature", issue = "0")]
167 #[rustc_deprecated(since = "1.0.0", reason = "text")]
168 #[unstable(feature = "test_feature", issue = "0")]
172 #[stable(feature = "rust1", since = "1.0.0")]
174 #[stable(feature = "rust1", since = "1.0.0")] u8,
175 #[unstable(feature = "test_feature", issue = "0")]
176 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
178 #[unstable(feature = "test_feature", issue = "0")]
181 #[stable(feature = "rust1", since = "1.0.0")]
183 #[rustc_deprecated(since = "1.0.0", reason = "text")]
184 #[unstable(feature = "test_feature", issue = "0")]
188 #[unstable(feature = "test_feature", issue = "0")]
190 #[stable(feature = "rust1", since = "1.0.0")] u8,
191 #[unstable(feature = "test_feature", issue = "0")]
192 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
194 #[unstable(feature = "test_feature", issue = "0")]
195 #[rustc_deprecated(since = "1.0.0", reason = "text")]
198 #[stable(feature = "rust1", since = "1.0.0")]
200 #[unstable(feature = "test_feature", issue = "0")]
204 #[unstable(feature = "test_feature", issue = "0")]
205 #[rustc_deprecated(since = "1.0.0", reason = "text")]
206 struct Deprecated2(u8,
207 #[stable(feature = "rust1", since = "1.0.0")] u8,
208 #[unstable(feature = "test_feature", issue = "0")] u8);
215 //~^ ERROR use of deprecated item
221 //~^ ERROR use of deprecated item
227 //~^ ERROR use of deprecated item
230 let Stable { .. } = x;
232 let x = Stable2(1, 2, 3);
237 //~^ ERROR use of deprecated item
242 //~^ ERROR use of deprecated item
252 //~^ ERROR use of deprecated item
258 //~^ ERROR use of deprecated item
264 //~^ ERROR use of deprecated item
268 // the patterns are all fine:
272 let x = Unstable2(1, 2, 3);
277 //~^ ERROR use of deprecated item
283 //~^ ERROR use of deprecated item
286 // the patterns are all fine:
291 //~^ ERROR use of deprecated item
293 //~^ ERROR use of deprecated item
295 //~^ ERROR use of deprecated item
297 //~^ ERROR use of deprecated item
301 //~^ ERROR use of deprecated item
303 //~^ ERROR use of deprecated item
305 //~^ ERROR use of deprecated item
308 //~^ ERROR use of deprecated item
310 //~^ ERROR use of deprecated item
312 //~^ ERROR use of deprecated item
314 //~^ ERROR use of deprecated item
318 //~^ ERROR use of deprecated item
319 // the patterns are all fine:
322 let x = Deprecated2(1, 2, 3);
323 //~^ 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
335 //~^ ERROR use of deprecated item
337 //~^ ERROR use of deprecated item
339 //~^ ERROR use of deprecated item
342 //~^ ERROR use of deprecated item
343 // the patterns are all fine: