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
27 let _ = x.override1; //~ ERROR use of unstable
28 let _ = x.override2; //~ ERROR use of unstable
33 override1: _, //~ ERROR use of unstable
34 override2: _, //~ ERROR use of unstable
38 let Stable { .. } = x;
40 let x = Stable2(1, 2, 3, 4);
43 let _ = x.1; //~ ERROR use of unstable
44 let _ = x.2; //~ ERROR use of unstable
48 _, //~ ERROR use of unstable
49 _, //~ ERROR use of unstable
56 let x = Unstable { //~ ERROR use of unstable
57 inherit: 1, //~ ERROR use of unstable
59 override2: 3, //~ ERROR use of unstable
62 let _ = x.inherit; //~ ERROR use of unstable
64 let _ = x.override2; //~ ERROR use of unstable
66 let Unstable { //~ ERROR use of unstable
67 inherit: _, //~ ERROR use of unstable
69 override2: _ //~ ERROR use of unstable
72 let Unstable //~ ERROR use of unstable
73 // the patterns are all fine:
76 // Unstable items are still unstable even when used through a stable "pub use".
77 let x = reexport::Unstable2(1, 2, 3); //~ ERROR use of unstable
79 let x = Unstable2(1, 2, 3); //~ ERROR use of unstable
81 let _ = x.0; //~ ERROR use of unstable
83 let _ = x.2; //~ ERROR use of unstable
85 let Unstable2 //~ ERROR use of unstable
86 (_, //~ ERROR use of unstable
88 _) //~ ERROR use of unstable
90 let Unstable2 //~ ERROR use of unstable
91 // the patterns are all fine:
95 let x = Deprecated { //~ ERROR use of unstable
96 inherit: 1, //~ ERROR use of unstable
98 override2: 3, //~ ERROR use of unstable
101 let _ = x.inherit; //~ ERROR use of unstable
103 let _ = x.override2; //~ ERROR use of unstable
105 let Deprecated { //~ ERROR use of unstable
106 inherit: _, //~ ERROR use of unstable
108 override2: _ //~ ERROR use of unstable
111 let Deprecated //~ ERROR use of unstable
112 // the patterns are all fine:
115 let x = Deprecated2(1, 2, 3); //~ ERROR use of unstable
117 let _ = x.0; //~ ERROR use of unstable
119 let _ = x.2; //~ ERROR use of unstable
121 let Deprecated2 //~ ERROR use of unstable
122 (_, //~ ERROR use of unstable
124 _) //~ ERROR use of unstable
126 let Deprecated2 //~ ERROR use of unstable
127 // the patterns are all fine:
133 #[stable(feature = "rust1", since = "1.0.0")]
136 #[unstable(feature = "unstable_test_feature", issue = "none")]
138 #[rustc_deprecated(since = "1.0.0", reason = "text")]
139 #[unstable(feature = "unstable_test_feature", issue = "none")]
141 #[stable(feature = "rust2", since = "2.0.0")]
145 #[stable(feature = "rust1", since = "1.0.0")]
147 #[stable(feature = "rust2", since = "2.0.0")] u8,
148 #[unstable(feature = "unstable_test_feature", issue = "none")]
149 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
151 #[unstable(feature = "unstable_test_feature", issue = "none")]
154 #[stable(feature = "rust1", since = "1.0.0")]
156 #[rustc_deprecated(since = "1.0.0", reason = "text")]
157 #[unstable(feature = "unstable_test_feature", issue = "none")]
161 #[unstable(feature = "unstable_test_feature", issue = "none")]
163 #[stable(feature = "rust1", since = "1.0.0")] u8,
164 #[unstable(feature = "unstable_test_feature", issue = "none")]
165 #[rustc_deprecated(since = "1.0.0", reason = "text")] u8);
167 #[unstable(feature = "unstable_test_feature", issue = "none")]
168 #[rustc_deprecated(since = "1.0.0", reason = "text")]
171 #[stable(feature = "rust1", since = "1.0.0")]
173 #[unstable(feature = "unstable_test_feature", issue = "none")]
177 #[unstable(feature = "unstable_test_feature", issue = "none")]
178 #[rustc_deprecated(since = "1.0.0", reason = "text")]
179 struct Deprecated2(u8,
180 #[stable(feature = "rust1", since = "1.0.0")] u8,
181 #[unstable(feature = "unstable_test_feature", issue = "none")] u8);
203 let Stable { .. } = x;
205 let x = Stable2(1, 2, 3);
236 // the patterns are all fine:
240 let x = Unstable2(1, 2, 3);
252 // the patterns are all fine:
273 // the patterns are all fine:
276 let x = Deprecated2(1, 2, 3);
288 // the patterns are all fine: