2 // aux-build:lint_stability.rs
3 // aux-build:inherited_stability.rs
4 // aux-build:stability_cfg1.rs
5 // aux-build:stability-cfg2.rs
6 // ignore-tidy-linelength
8 #![feature(staged_api, unstable_test_feature)]
10 #![stable(feature = "rust1", since = "1.0.0")]
13 extern crate lint_stability;
16 extern crate stability_cfg1;
17 extern crate stability_cfg2;
19 use lint_stability::*;
22 type Foo = MethodTester;
23 let foo = MethodTester;
25 deprecated(); //~ WARN use of deprecated function `lint_stability::deprecated`
26 foo.method_deprecated(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
27 Foo::method_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
28 <Foo>::method_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
29 foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
30 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
31 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
32 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
34 deprecated_text(); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
35 foo.method_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
36 Foo::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
37 <Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
38 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
39 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
40 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
41 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
43 deprecated_unstable(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable`
44 foo.method_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
45 Foo::method_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
46 <Foo>::method_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
47 foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
48 Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
49 <Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
50 <Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
52 deprecated_unstable_text(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable_text`: text
53 foo.method_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
54 Foo::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
55 <Foo>::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
56 foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
57 Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
58 <Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
59 <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
62 foo.method_unstable();
63 Foo::method_unstable(&foo);
64 <Foo>::method_unstable(&foo);
66 Trait::trait_unstable(&foo);
67 <Foo>::trait_unstable(&foo);
68 <Foo as Trait>::trait_unstable(&foo);
71 foo.method_unstable_text();
72 Foo::method_unstable_text(&foo);
73 <Foo>::method_unstable_text(&foo);
74 foo.trait_unstable_text();
75 Trait::trait_unstable_text(&foo);
76 <Foo>::trait_unstable_text(&foo);
77 <Foo as Trait>::trait_unstable_text(&foo);
81 Foo::method_stable(&foo);
82 <Foo>::method_stable(&foo);
84 Trait::trait_stable(&foo);
85 <Foo>::trait_stable(&foo);
86 <Foo as Trait>::trait_stable(&foo);
89 foo.method_stable_text();
90 Foo::method_stable_text(&foo);
91 <Foo>::method_stable_text(&foo);
92 foo.trait_stable_text();
93 Trait::trait_stable_text(&foo);
94 <Foo>::trait_stable_text(&foo);
95 <Foo as Trait>::trait_stable_text(&foo);
97 struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
98 struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
99 //~^ WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`: text
100 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`: text
101 type A = dyn TraitWithAssociatedTypes<
103 TypeDeprecated = u16,
104 //~^ WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
105 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
106 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
109 let _ = DeprecatedStruct { //~ WARN use of deprecated struct `lint_stability::DeprecatedStruct`
110 i: 0 //~ WARN use of deprecated field `lint_stability::DeprecatedStruct::i`
112 let _ = DeprecatedUnstableStruct {
113 //~^ WARN use of deprecated struct `lint_stability::DeprecatedUnstableStruct`
114 i: 0 //~ WARN use of deprecated field `lint_stability::DeprecatedUnstableStruct::i`
116 let _ = UnstableStruct { i: 0 };
117 let _ = StableStruct { i: 0 };
119 let _ = DeprecatedUnitStruct; //~ WARN use of deprecated struct `lint_stability::DeprecatedUnitStruct`
120 let _ = DeprecatedUnstableUnitStruct; //~ WARN use of deprecated struct `lint_stability::DeprecatedUnstableUnitStruct`
121 let _ = UnstableUnitStruct;
122 let _ = StableUnitStruct;
124 let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated variant `lint_stability::Enum::DeprecatedVariant`
125 let _ = Enum::DeprecatedUnstableVariant; //~ WARN use of deprecated variant `lint_stability::Enum::DeprecatedUnstableVariant`
126 let _ = Enum::UnstableVariant;
127 let _ = Enum::StableVariant;
129 let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated struct `lint_stability::DeprecatedTupleStruct`
130 let _ = DeprecatedUnstableTupleStruct (1); //~ WARN use of deprecated struct `lint_stability::DeprecatedUnstableTupleStruct`
131 let _ = UnstableTupleStruct (1);
132 let _ = StableTupleStruct (1);
134 // At the moment, the lint checker only checks stability in
135 // in the arguments of macros.
136 // Eventually, we will want to lint the contents of the
137 // macro in the module *defining* it. Also, stability levels
138 // on macros themselves are not yet linted.
139 macro_test_arg!(deprecated_text()); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
140 macro_test_arg!(deprecated_unstable_text()); //~ WARN use of deprecated function `lint_stability::deprecated_unstable_text`: text
141 macro_test_arg!(macro_test_arg!(deprecated_text())); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
144 fn test_method_param<Foo: Trait>(foo: Foo) {
145 foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
146 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
147 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
148 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
149 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
150 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
151 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
152 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
153 foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
154 Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
155 <Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
156 <Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
157 foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
158 Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
159 <Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
160 <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
161 foo.trait_unstable();
162 Trait::trait_unstable(&foo);
163 <Foo>::trait_unstable(&foo);
164 <Foo as Trait>::trait_unstable(&foo);
165 foo.trait_unstable_text();
166 Trait::trait_unstable_text(&foo);
167 <Foo>::trait_unstable_text(&foo);
168 <Foo as Trait>::trait_unstable_text(&foo);
170 Trait::trait_stable(&foo);
171 <Foo>::trait_stable(&foo);
172 <Foo as Trait>::trait_stable(&foo);
175 fn test_method_object(foo: &dyn Trait) {
176 foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
177 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
178 foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
179 foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
180 foo.trait_unstable();
181 foo.trait_unstable_text();
187 impl UnstableTrait for S { }
188 impl DeprecatedTrait for S {} //~ WARN use of deprecated trait `lint_stability::DeprecatedTrait`: text
189 trait LocalTrait : UnstableTrait { }
190 trait LocalTrait2 : DeprecatedTrait { } //~ WARN use of deprecated trait `lint_stability::DeprecatedTrait`: text
193 fn trait_stable(&self) {}
194 fn trait_unstable(&self) {}
199 extern crate inherited_stability;
200 use self::inherited_stability::*;
202 fn test_inheritance() {
206 stable_mod::unstable();
207 stable_mod::stable();
209 unstable_mod::deprecated(); //~ WARN use of deprecated function `inheritance::inherited_stability::unstable_mod::deprecated`: text
210 unstable_mod::unstable();
212 let _ = Unstable::UnstableVariant;
213 let _ = Unstable::StableVariant;
222 #[unstable(feature = "unstable_test_feature", issue = "none")]
223 #[rustc_deprecated(since = "1.0.0", reason = "text")]
224 pub fn deprecated() {}
225 #[unstable(feature = "unstable_test_feature", issue = "none")]
226 #[rustc_deprecated(since = "1.0.0", reason = "text")]
227 pub fn deprecated_text() {}
229 #[unstable(feature = "unstable_test_feature", issue = "none")]
231 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
232 pub fn unstable_text() {}
234 #[stable(feature = "rust1", since = "1.0.0")]
236 #[stable(feature = "rust1", since = "1.0.0")]
237 pub fn stable_text() {}
239 #[stable(feature = "rust1", since = "1.0.0")]
240 pub struct MethodTester;
243 #[unstable(feature = "unstable_test_feature", issue = "none")]
244 #[rustc_deprecated(since = "1.0.0", reason = "text")]
245 pub fn method_deprecated(&self) {}
246 #[unstable(feature = "unstable_test_feature", issue = "none")]
247 #[rustc_deprecated(since = "1.0.0", reason = "text")]
248 pub fn method_deprecated_text(&self) {}
250 #[unstable(feature = "unstable_test_feature", issue = "none")]
251 pub fn method_unstable(&self) {}
252 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
253 pub fn method_unstable_text(&self) {}
255 #[stable(feature = "rust1", since = "1.0.0")]
256 pub fn method_stable(&self) {}
257 #[stable(feature = "rust1", since = "1.0.0")]
258 pub fn method_stable_text(&self) {}
262 #[unstable(feature = "unstable_test_feature", issue = "none")]
263 #[rustc_deprecated(since = "1.0.0", reason = "text")]
264 fn trait_deprecated(&self) {}
265 #[unstable(feature = "unstable_test_feature", issue = "none")]
266 #[rustc_deprecated(since = "1.0.0", reason = "text")]
267 fn trait_deprecated_text(&self) {}
269 #[unstable(feature = "unstable_test_feature", issue = "none")]
270 fn trait_unstable(&self) {}
271 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
272 fn trait_unstable_text(&self) {}
274 #[stable(feature = "rust1", since = "1.0.0")]
275 fn trait_stable(&self) {}
276 #[stable(feature = "rust1", since = "1.0.0")]
277 fn trait_stable_text(&self) {}
280 impl Trait for MethodTester {}
282 #[unstable(feature = "unstable_test_feature", issue = "none")]
283 #[rustc_deprecated(since = "1.0.0", reason = "text")]
284 pub struct DeprecatedStruct {
285 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
287 #[unstable(feature = "unstable_test_feature", issue = "none")]
288 pub struct UnstableStruct {
289 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
291 #[stable(feature = "rust1", since = "1.0.0")]
292 pub struct StableStruct {
293 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
296 #[unstable(feature = "unstable_test_feature", issue = "none")]
297 #[rustc_deprecated(since = "1.0.0", reason = "text")]
298 pub struct DeprecatedUnitStruct;
299 #[unstable(feature = "unstable_test_feature", issue = "none")]
300 pub struct UnstableUnitStruct;
301 #[stable(feature = "rust1", since = "1.0.0")]
302 pub struct StableUnitStruct;
305 #[unstable(feature = "unstable_test_feature", issue = "none")]
306 #[rustc_deprecated(since = "1.0.0", reason = "text")]
308 #[unstable(feature = "unstable_test_feature", issue = "none")]
311 #[stable(feature = "rust1", since = "1.0.0")]
315 #[unstable(feature = "unstable_test_feature", issue = "none")]
316 #[rustc_deprecated(since = "1.0.0", reason = "text")]
317 pub struct DeprecatedTupleStruct(isize);
318 #[unstable(feature = "unstable_test_feature", issue = "none")]
319 pub struct UnstableTupleStruct(isize);
320 #[stable(feature = "rust1", since = "1.0.0")]
321 pub struct StableTupleStruct(isize);
324 // Only the deprecated cases of the following should generate
325 // errors, because other stability attributes now have meaning
326 // only *across* crates, not within a single crate.
328 type Foo = MethodTester;
329 let foo = MethodTester;
331 deprecated(); //~ WARN use of deprecated function `this_crate::deprecated`
332 foo.method_deprecated(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
333 Foo::method_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
334 <Foo>::method_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
335 foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
336 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
337 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
338 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
340 deprecated_text(); //~ WARN use of deprecated function `this_crate::deprecated_text`: text
341 foo.method_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
342 Foo::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
343 <Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
344 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
345 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
346 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
347 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
350 foo.method_unstable();
351 Foo::method_unstable(&foo);
352 <Foo>::method_unstable(&foo);
353 foo.trait_unstable();
354 Trait::trait_unstable(&foo);
355 <Foo>::trait_unstable(&foo);
356 <Foo as Trait>::trait_unstable(&foo);
359 foo.method_unstable_text();
360 Foo::method_unstable_text(&foo);
361 <Foo>::method_unstable_text(&foo);
362 foo.trait_unstable_text();
363 Trait::trait_unstable_text(&foo);
364 <Foo>::trait_unstable_text(&foo);
365 <Foo as Trait>::trait_unstable_text(&foo);
369 Foo::method_stable(&foo);
370 <Foo>::method_stable(&foo);
372 Trait::trait_stable(&foo);
373 <Foo>::trait_stable(&foo);
374 <Foo as Trait>::trait_stable(&foo);
377 foo.method_stable_text();
378 Foo::method_stable_text(&foo);
379 <Foo>::method_stable_text(&foo);
380 foo.trait_stable_text();
381 Trait::trait_stable_text(&foo);
382 <Foo>::trait_stable_text(&foo);
383 <Foo as Trait>::trait_stable_text(&foo);
385 let _ = DeprecatedStruct {
386 //~^ WARN use of deprecated struct `this_crate::DeprecatedStruct`
387 i: 0 //~ WARN use of deprecated field `this_crate::DeprecatedStruct::i`
389 let _ = UnstableStruct { i: 0 };
390 let _ = StableStruct { i: 0 };
392 let _ = DeprecatedUnitStruct; //~ WARN use of deprecated unit struct `this_crate::DeprecatedUnitStruct`
393 let _ = UnstableUnitStruct;
394 let _ = StableUnitStruct;
396 let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated unit variant `this_crate::Enum::DeprecatedVariant`
397 let _ = Enum::UnstableVariant;
398 let _ = Enum::StableVariant;
400 let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated tuple struct `this_crate::DeprecatedTupleStruct`
401 let _ = UnstableTupleStruct (1);
402 let _ = StableTupleStruct (1);
405 fn test_method_param<Foo: Trait>(foo: Foo) {
406 foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
407 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
408 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
409 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
410 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
411 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
412 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
413 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
414 foo.trait_unstable();
415 Trait::trait_unstable(&foo);
416 <Foo>::trait_unstable(&foo);
417 <Foo as Trait>::trait_unstable(&foo);
418 foo.trait_unstable_text();
419 Trait::trait_unstable_text(&foo);
420 <Foo>::trait_unstable_text(&foo);
421 <Foo as Trait>::trait_unstable_text(&foo);
423 Trait::trait_stable(&foo);
424 <Foo>::trait_stable(&foo);
425 <Foo as Trait>::trait_stable(&foo);
428 fn test_method_object(foo: &dyn Trait) {
429 foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
430 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
431 foo.trait_unstable();
432 foo.trait_unstable_text();
436 #[unstable(feature = "unstable_test_feature", issue = "none")]
437 #[rustc_deprecated(since = "1.0.0", reason = "text")]
440 fn_in_body(); //~ WARN use of deprecated function `this_crate::test_fn_body::fn_in_body`: text
444 #[unstable(feature = "unstable_test_feature", issue = "none")]
445 #[rustc_deprecated(since = "1.0.0", reason = "text")]
446 fn test_method_body(&self) {
448 fn_in_body(); //~ WARN use of deprecated function `this_crate::MethodTester::test_method_body::fn_in_body`: text
452 #[unstable(feature = "unstable_test_feature", issue = "none")]
453 #[rustc_deprecated(since = "1.0.0", reason = "text")]
454 pub trait DeprecatedTrait {
460 impl DeprecatedTrait for S { } //~ WARN use of deprecated trait `this_crate::DeprecatedTrait`
462 trait LocalTrait : DeprecatedTrait { } //~ WARN use of deprecated trait `this_crate::DeprecatedTrait`