2 // aux-build:lint_stability.rs
3 // aux-build:inherited_stability.rs
4 // aux-build:stability_cfg1.rs
5 // aux-build:stability-cfg2.rs
7 #![feature(staged_api, unstable_test_feature)]
9 #![stable(feature = "rust1", since = "1.0.0")]
12 extern crate lint_stability;
15 extern crate stability_cfg1;
16 extern crate stability_cfg2;
18 use lint_stability::*;
21 type Foo = MethodTester;
22 let foo = MethodTester;
24 deprecated(); //~ WARN use of deprecated function `lint_stability::deprecated`
25 foo.method_deprecated(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
26 Foo::method_deprecated(&foo); //~ 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.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
29 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
30 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
31 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
33 deprecated_text(); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
34 foo.method_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
35 Foo::method_deprecated_text(&foo); //~ 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.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
38 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
39 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
40 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
42 deprecated_unstable(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable`
43 foo.method_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
44 Foo::method_deprecated_unstable(&foo); //~ 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.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
47 Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
48 <Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
49 <Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
51 deprecated_unstable_text(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable_text`: text
52 foo.method_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
53 Foo::method_deprecated_unstable_text(&foo); //~ 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.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
56 Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
57 <Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
58 <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
61 foo.method_unstable();
62 Foo::method_unstable(&foo);
63 <Foo>::method_unstable(&foo);
65 Trait::trait_unstable(&foo);
66 <Foo>::trait_unstable(&foo);
67 <Foo as Trait>::trait_unstable(&foo);
70 foo.method_unstable_text();
71 Foo::method_unstable_text(&foo);
72 <Foo>::method_unstable_text(&foo);
73 foo.trait_unstable_text();
74 Trait::trait_unstable_text(&foo);
75 <Foo>::trait_unstable_text(&foo);
76 <Foo as Trait>::trait_unstable_text(&foo);
80 Foo::method_stable(&foo);
81 <Foo>::method_stable(&foo);
83 Trait::trait_stable(&foo);
84 <Foo>::trait_stable(&foo);
85 <Foo as Trait>::trait_stable(&foo);
88 foo.method_stable_text();
89 Foo::method_stable_text(&foo);
90 <Foo>::method_stable_text(&foo);
91 foo.trait_stable_text();
92 Trait::trait_stable_text(&foo);
93 <Foo>::trait_stable_text(&foo);
94 <Foo as Trait>::trait_stable_text(&foo);
96 struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
97 struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
98 //~^ WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`: text
99 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`: text
100 type A = dyn TraitWithAssociatedTypes<
102 TypeDeprecated = u16,
103 //~^ WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
104 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
105 //~| WARN use of deprecated associated type `lint_stability::TraitWithAssociatedTypes::TypeDeprecated`
108 let _ = DeprecatedStruct { //~ WARN use of deprecated struct `lint_stability::DeprecatedStruct`
109 i: 0 //~ WARN use of deprecated field `lint_stability::DeprecatedStruct::i`
111 let _ = DeprecatedUnstableStruct {
112 //~^ WARN use of deprecated struct `lint_stability::DeprecatedUnstableStruct`
113 i: 0 //~ WARN use of deprecated field `lint_stability::DeprecatedUnstableStruct::i`
115 let _ = UnstableStruct { i: 0 };
116 let _ = StableStruct { i: 0 };
118 let _ = DeprecatedUnitStruct; //~ WARN use of deprecated unit struct `lint_stability::DeprecatedUnitStruct`
119 let _ = DeprecatedUnstableUnitStruct; //~ WARN use of deprecated unit struct `lint_stability::DeprecatedUnstableUnitStruct`
120 let _ = UnstableUnitStruct;
121 let _ = StableUnitStruct;
123 let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated unit variant `lint_stability::Enum::DeprecatedVariant`
124 let _ = Enum::DeprecatedUnstableVariant; //~ WARN use of deprecated unit variant `lint_stability::Enum::DeprecatedUnstableVariant`
125 let _ = Enum::UnstableVariant;
126 let _ = Enum::StableVariant;
128 let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated tuple struct `lint_stability::DeprecatedTupleStruct`
129 let _ = DeprecatedUnstableTupleStruct (1); //~ WARN use of deprecated tuple struct `lint_stability::DeprecatedUnstableTupleStruct`
130 let _ = UnstableTupleStruct (1);
131 let _ = StableTupleStruct (1);
133 // At the moment, the lint checker only checks stability
134 // in the arguments of macros.
135 // Eventually, we will want to lint the contents of the
136 // macro in the module *defining* it. Also, stability levels
137 // on macros themselves are not yet linted.
138 macro_test_arg!(deprecated_text()); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
139 macro_test_arg!(deprecated_unstable_text()); //~ WARN use of deprecated function `lint_stability::deprecated_unstable_text`: text
140 macro_test_arg!(macro_test_arg!(deprecated_text())); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
143 fn test_method_param<Foo: Trait>(foo: Foo) {
144 foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
145 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
146 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
147 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
148 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
149 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
150 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
151 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
152 foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
153 Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
154 <Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
155 <Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
156 foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
157 Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
158 <Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
159 <Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
160 foo.trait_unstable();
161 Trait::trait_unstable(&foo);
162 <Foo>::trait_unstable(&foo);
163 <Foo as Trait>::trait_unstable(&foo);
164 foo.trait_unstable_text();
165 Trait::trait_unstable_text(&foo);
166 <Foo>::trait_unstable_text(&foo);
167 <Foo as Trait>::trait_unstable_text(&foo);
169 Trait::trait_stable(&foo);
170 <Foo>::trait_stable(&foo);
171 <Foo as Trait>::trait_stable(&foo);
174 fn test_method_object(foo: &dyn Trait) {
175 foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
176 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
177 foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
178 foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
179 foo.trait_unstable();
180 foo.trait_unstable_text();
186 impl UnstableTrait for S { }
187 impl DeprecatedTrait for S {} //~ WARN use of deprecated trait `lint_stability::DeprecatedTrait`: text
188 trait LocalTrait : UnstableTrait { }
189 trait LocalTrait2 : DeprecatedTrait { } //~ WARN use of deprecated trait `lint_stability::DeprecatedTrait`: text
192 fn trait_stable(&self) {}
193 fn trait_unstable(&self) {}
198 extern crate inherited_stability;
199 use self::inherited_stability::*;
201 fn test_inheritance() {
205 stable_mod::unstable();
206 stable_mod::stable();
208 unstable_mod::deprecated(); //~ WARN use of deprecated function `inheritance::inherited_stability::unstable_mod::deprecated`: text
209 unstable_mod::unstable();
211 let _ = Unstable::UnstableVariant;
212 let _ = Unstable::StableVariant;
221 #[unstable(feature = "unstable_test_feature", issue = "none")]
222 #[deprecated(since = "1.0.0", note = "text")]
223 pub fn deprecated() {}
224 #[unstable(feature = "unstable_test_feature", issue = "none")]
225 #[deprecated(since = "1.0.0", note = "text")]
226 pub fn deprecated_text() {}
228 #[unstable(feature = "unstable_test_feature", issue = "none")]
230 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
231 pub fn unstable_text() {}
233 #[stable(feature = "rust1", since = "1.0.0")]
235 #[stable(feature = "rust1", since = "1.0.0")]
236 pub fn stable_text() {}
238 #[stable(feature = "rust1", since = "1.0.0")]
239 pub struct MethodTester;
242 #[unstable(feature = "unstable_test_feature", issue = "none")]
243 #[deprecated(since = "1.0.0", note = "text")]
244 pub fn method_deprecated(&self) {}
245 #[unstable(feature = "unstable_test_feature", issue = "none")]
246 #[deprecated(since = "1.0.0", note = "text")]
247 pub fn method_deprecated_text(&self) {}
249 #[unstable(feature = "unstable_test_feature", issue = "none")]
250 pub fn method_unstable(&self) {}
251 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
252 pub fn method_unstable_text(&self) {}
254 #[stable(feature = "rust1", since = "1.0.0")]
255 pub fn method_stable(&self) {}
256 #[stable(feature = "rust1", since = "1.0.0")]
257 pub fn method_stable_text(&self) {}
261 #[unstable(feature = "unstable_test_feature", issue = "none")]
262 #[deprecated(since = "1.0.0", note = "text")]
263 fn trait_deprecated(&self) {}
264 #[unstable(feature = "unstable_test_feature", issue = "none")]
265 #[deprecated(since = "1.0.0", note = "text")]
266 fn trait_deprecated_text(&self) {}
268 #[unstable(feature = "unstable_test_feature", issue = "none")]
269 fn trait_unstable(&self) {}
270 #[unstable(feature = "unstable_test_feature", reason = "text", issue = "none")]
271 fn trait_unstable_text(&self) {}
273 #[stable(feature = "rust1", since = "1.0.0")]
274 fn trait_stable(&self) {}
275 #[stable(feature = "rust1", since = "1.0.0")]
276 fn trait_stable_text(&self) {}
279 impl Trait for MethodTester {}
281 #[unstable(feature = "unstable_test_feature", issue = "none")]
282 #[deprecated(since = "1.0.0", note = "text")]
283 pub struct DeprecatedStruct {
284 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
286 #[unstable(feature = "unstable_test_feature", issue = "none")]
287 pub struct UnstableStruct {
288 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
290 #[stable(feature = "rust1", since = "1.0.0")]
291 pub struct StableStruct {
292 #[stable(feature = "stable_test_feature", since = "1.0.0")] i: isize
295 #[unstable(feature = "unstable_test_feature", issue = "none")]
296 #[deprecated(since = "1.0.0", note = "text")]
297 pub struct DeprecatedUnitStruct;
298 #[unstable(feature = "unstable_test_feature", issue = "none")]
299 pub struct UnstableUnitStruct;
300 #[stable(feature = "rust1", since = "1.0.0")]
301 pub struct StableUnitStruct;
304 #[unstable(feature = "unstable_test_feature", issue = "none")]
305 #[deprecated(since = "1.0.0", note = "text")]
307 #[unstable(feature = "unstable_test_feature", issue = "none")]
310 #[stable(feature = "rust1", since = "1.0.0")]
314 #[unstable(feature = "unstable_test_feature", issue = "none")]
315 #[deprecated(since = "1.0.0", note = "text")]
316 pub struct DeprecatedTupleStruct(isize);
317 #[unstable(feature = "unstable_test_feature", issue = "none")]
318 pub struct UnstableTupleStruct(isize);
319 #[stable(feature = "rust1", since = "1.0.0")]
320 pub struct StableTupleStruct(isize);
323 // Only the deprecated cases of the following should generate
324 // errors, because other stability attributes now have meaning
325 // only *across* crates, not within a single crate.
327 type Foo = MethodTester;
328 let foo = MethodTester;
330 deprecated(); //~ WARN use of deprecated function `this_crate::deprecated`
331 foo.method_deprecated(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
332 Foo::method_deprecated(&foo); //~ 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.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
335 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
336 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
337 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
339 deprecated_text(); //~ WARN use of deprecated function `this_crate::deprecated_text`: text
340 foo.method_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
341 Foo::method_deprecated_text(&foo); //~ 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.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
344 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
345 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
346 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
349 foo.method_unstable();
350 Foo::method_unstable(&foo);
351 <Foo>::method_unstable(&foo);
352 foo.trait_unstable();
353 Trait::trait_unstable(&foo);
354 <Foo>::trait_unstable(&foo);
355 <Foo as Trait>::trait_unstable(&foo);
358 foo.method_unstable_text();
359 Foo::method_unstable_text(&foo);
360 <Foo>::method_unstable_text(&foo);
361 foo.trait_unstable_text();
362 Trait::trait_unstable_text(&foo);
363 <Foo>::trait_unstable_text(&foo);
364 <Foo as Trait>::trait_unstable_text(&foo);
368 Foo::method_stable(&foo);
369 <Foo>::method_stable(&foo);
371 Trait::trait_stable(&foo);
372 <Foo>::trait_stable(&foo);
373 <Foo as Trait>::trait_stable(&foo);
376 foo.method_stable_text();
377 Foo::method_stable_text(&foo);
378 <Foo>::method_stable_text(&foo);
379 foo.trait_stable_text();
380 Trait::trait_stable_text(&foo);
381 <Foo>::trait_stable_text(&foo);
382 <Foo as Trait>::trait_stable_text(&foo);
384 let _ = DeprecatedStruct {
385 //~^ WARN use of deprecated struct `this_crate::DeprecatedStruct`
386 i: 0 //~ WARN use of deprecated field `this_crate::DeprecatedStruct::i`
388 let _ = UnstableStruct { i: 0 };
389 let _ = StableStruct { i: 0 };
391 let _ = DeprecatedUnitStruct; //~ WARN use of deprecated unit struct `this_crate::DeprecatedUnitStruct`
392 let _ = UnstableUnitStruct;
393 let _ = StableUnitStruct;
395 let _ = Enum::DeprecatedVariant; //~ WARN use of deprecated unit variant `this_crate::Enum::DeprecatedVariant`
396 let _ = Enum::UnstableVariant;
397 let _ = Enum::StableVariant;
399 let _ = DeprecatedTupleStruct (1); //~ WARN use of deprecated tuple struct `this_crate::DeprecatedTupleStruct`
400 let _ = UnstableTupleStruct (1);
401 let _ = StableTupleStruct (1);
404 fn test_method_param<Foo: Trait>(foo: Foo) {
405 foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
406 Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
407 <Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
408 <Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
409 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
410 Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
411 <Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
412 <Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
413 foo.trait_unstable();
414 Trait::trait_unstable(&foo);
415 <Foo>::trait_unstable(&foo);
416 <Foo as Trait>::trait_unstable(&foo);
417 foo.trait_unstable_text();
418 Trait::trait_unstable_text(&foo);
419 <Foo>::trait_unstable_text(&foo);
420 <Foo as Trait>::trait_unstable_text(&foo);
422 Trait::trait_stable(&foo);
423 <Foo>::trait_stable(&foo);
424 <Foo as Trait>::trait_stable(&foo);
427 fn test_method_object(foo: &dyn Trait) {
428 foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
429 foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
430 foo.trait_unstable();
431 foo.trait_unstable_text();
435 #[unstable(feature = "unstable_test_feature", issue = "none")]
436 #[deprecated(since = "1.0.0", note = "text")]
439 fn_in_body(); //~ WARN use of deprecated function `this_crate::test_fn_body::fn_in_body`: text
443 #[unstable(feature = "unstable_test_feature", issue = "none")]
444 #[deprecated(since = "1.0.0", note = "text")]
445 fn test_method_body(&self) {
447 fn_in_body(); //~ WARN use of deprecated function `this_crate::MethodTester::test_method_body::fn_in_body`: text
451 #[unstable(feature = "unstable_test_feature", issue = "none")]
452 #[deprecated(since = "1.0.0", note = "text")]
453 pub trait DeprecatedTrait {
459 impl DeprecatedTrait for S { } //~ WARN use of deprecated trait `this_crate::DeprecatedTrait`
461 trait LocalTrait : DeprecatedTrait { } //~ WARN use of deprecated trait `this_crate::DeprecatedTrait`