diff options
Diffstat (limited to '')
6 files changed, 128 insertions, 128 deletions
diff --git a/tests/ui/deprecation/deprecation-lint.rs b/tests/ui/deprecation/deprecation-lint.rs index 0417e952e..83056feaf 100644 --- a/tests/ui/deprecation/deprecation-lint.rs +++ b/tests/ui/deprecation/deprecation-lint.rs @@ -14,22 +14,22 @@ mod cross_crate { let foo = MethodTester; deprecated(); //~ ERROR use of deprecated function `deprecation_lint::deprecated` - foo.method_deprecated(); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated` - Foo::method_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated` - <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated` - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - Trait::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` + foo.method_deprecated(); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated` + Foo::method_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated` + <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated` + foo.trait_deprecated(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + Trait::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` deprecated_text(); //~ ERROR use of deprecated function `deprecation_lint::deprecated_text`: text - foo.method_deprecated_text(); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text - Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text - <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text + foo.method_deprecated_text(); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text + Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text + <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text let _ = DeprecatedStruct { //~ ERROR use of deprecated struct `deprecation_lint::DeprecatedStruct`: text i: 0 //~ ERROR use of deprecated field `deprecation_lint::DeprecatedStruct::i`: text @@ -61,19 +61,19 @@ mod cross_crate { } fn test_method_param<Foo: Trait>(foo: Foo) { - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - Trait::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text - <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text + foo.trait_deprecated(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + Trait::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text + <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text } fn test_method_object(foo: &Trait) { - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated` - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text + foo.trait_deprecated(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated` + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text } struct S; @@ -243,22 +243,22 @@ mod this_crate { let foo = MethodTester; deprecated(); //~ ERROR use of deprecated function `this_crate::deprecated` - foo.method_deprecated(); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated` - Foo::method_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated` - <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated` - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - Trait::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` + foo.method_deprecated(); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated` + Foo::method_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated` + <Foo>::method_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated` + foo.trait_deprecated(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + Trait::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` deprecated_text(); //~ ERROR use of deprecated function `this_crate::deprecated_text`: text - foo.method_deprecated_text(); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text - Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text - <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text + foo.method_deprecated_text(); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text + Foo::method_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text + <Foo>::method_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text // Future deprecations are only permitted with `#![feature(staged_api)]` deprecated_future(); //~ ERROR use of deprecated function @@ -289,19 +289,19 @@ mod this_crate { } fn test_method_param<Foo: Trait>(foo: Foo) { - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - Trait::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text - <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text + foo.trait_deprecated(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + Trait::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + <Foo>::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + <Foo as Trait>::trait_deprecated(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + Trait::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + <Foo>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text + <Foo as Trait>::trait_deprecated_text(&foo); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text } fn test_method_object(foo: &Trait) { - foo.trait_deprecated(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated` - foo.trait_deprecated_text(); //~ ERROR use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text + foo.trait_deprecated(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated` + foo.trait_deprecated_text(); //~ ERROR use of deprecated method `this_crate::Trait::trait_deprecated_text`: text } #[deprecated(since = "1.0.0", note = "text")] diff --git a/tests/ui/deprecation/deprecation-lint.stderr b/tests/ui/deprecation/deprecation-lint.stderr index 3842f8492..209807340 100644 --- a/tests/ui/deprecation/deprecation-lint.stderr +++ b/tests/ui/deprecation/deprecation-lint.stderr @@ -10,13 +10,13 @@ note: the lint level is defined here LL | #![deny(deprecated)] | ^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:21:16 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:23:25 | LL | <Foo as Trait>::trait_deprecated(&foo); @@ -28,13 +28,13 @@ error: use of deprecated function `deprecation_lint::deprecated_text`: text LL | deprecated_text(); | ^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:30:16 | -LL | ... Trait::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | Trait::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:32:25 | LL | ... <Foo as Trait>::trait_deprecated_text(&foo); @@ -100,25 +100,25 @@ error: use of deprecated function `deprecation_lint::deprecated_text`: text LL | macro_test_arg!(macro_test_arg!(deprecated_text())); | ^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:65:16 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:67:25 | LL | <Foo as Trait>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:69:16 | -LL | ... Trait::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | Trait::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:71:25 | LL | ... <Foo as Trait>::trait_deprecated_text(&foo); @@ -184,13 +184,13 @@ error: use of deprecated function `this_crate::deprecated`: text LL | deprecated(); | ^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:250:16 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:252:25 | LL | <Foo as Trait>::trait_deprecated(&foo); @@ -202,17 +202,17 @@ error: use of deprecated function `this_crate::deprecated_text`: text LL | deprecated_text(); | ^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:259:16 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:261:25 | -LL | ... <Foo as Trait>::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | <Foo as Trait>::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated function `this_crate::deprecated_future`: text --> $DIR/deprecation-lint.rs:264:9 @@ -274,29 +274,29 @@ error: use of deprecated tuple struct `this_crate::nested::DeprecatedTupleStruct LL | ... let _ = nested::DeprecatedTupleStruct (1); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:293:16 | LL | Trait::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:295:25 | LL | <Foo as Trait>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:297:16 | LL | Trait::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:299:25 | -LL | ... <Foo as Trait>::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | <Foo as Trait>::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated function `this_crate::test_fn_closure_body::{closure#0}::bar` --> $DIR/deprecation-lint.rs:317:13 @@ -352,65 +352,65 @@ error: use of deprecated tuple struct `this_crate2::Deprecated2`: text LL | let Deprecated2 | ^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:17:13 | LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:18:14 | LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:19:16 | LL | <Foo>::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:20:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:22:16 | LL | <Foo>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:26:13 | -LL | ... foo.method_deprecated_text(); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | foo.method_deprecated_text(); + | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:27:14 | -LL | ... Foo::method_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | Foo::method_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::MethodTester::method_deprecated_text`: text +error: use of deprecated method `deprecation_lint::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:28:16 | LL | ... <Foo>::method_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:29:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:31:16 | -LL | ... <Foo>::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | <Foo>::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ error: use of deprecated field `deprecation_lint::DeprecatedStruct::i`: text --> $DIR/deprecation-lint.rs:35:13 @@ -424,37 +424,37 @@ error: use of deprecated field `deprecation_lint::nested::DeprecatedStruct::i`: LL | i: 0 | ^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:64:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:66:16 | LL | <Foo>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:68:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:70:16 | -LL | ... <Foo>::trait_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^ +LL | <Foo>::trait_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:75:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `deprecation_lint::Trait::trait_deprecated_text`: text +error: use of deprecated method `deprecation_lint::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:76:13 | LL | foo.trait_deprecated_text(); @@ -544,61 +544,61 @@ error: use of deprecated field `deprecation_lint::Deprecated2::2`: text LL | _) | ^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:246:13 | LL | foo.method_deprecated(); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:247:14 | LL | Foo::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated`: text --> $DIR/deprecation-lint.rs:248:16 | LL | <Foo>::method_deprecated(&foo); | ^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:249:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:251:16 | LL | <Foo>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:255:13 | -LL | ... foo.method_deprecated_text(); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | foo.method_deprecated_text(); + | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:256:14 | -LL | ... Foo::method_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | Foo::method_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text +error: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text --> $DIR/deprecation-lint.rs:257:16 | -LL | ... <Foo>::method_deprecated_text(&foo); - | ^^^^^^^^^^^^^^^^^^^^^^ +LL | <Foo>::method_deprecated_text(&foo); + | ^^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:258:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:260:16 | LL | <Foo>::trait_deprecated_text(&foo); @@ -616,37 +616,37 @@ error: use of deprecated field `this_crate::nested::DeprecatedStruct::i`: text LL | i: 0 | ^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:292:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:294:16 | LL | <Foo>::trait_deprecated(&foo); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:296:13 | LL | foo.trait_deprecated_text(); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:298:16 | LL | <Foo>::trait_deprecated_text(&foo); | ^^^^^^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated`: text --> $DIR/deprecation-lint.rs:303:13 | LL | foo.trait_deprecated(); | ^^^^^^^^^^^^^^^^ -error: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text +error: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text --> $DIR/deprecation-lint.rs:304:13 | LL | foo.trait_deprecated_text(); diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed index 99a2b0961..85e882870 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.fixed @@ -3,7 +3,7 @@ #![deny(deprecated)] fn main() { - let _foo = str::trim_start(" aoeu"); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] + let _foo = str::trim_start(" aoeu"); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] - let _bar = " aoeu".trim_start(); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] + let _bar = " aoeu".trim_start(); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] } diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs index 62bf84aa3..246de2f5e 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.rs @@ -3,7 +3,7 @@ #![deny(deprecated)] fn main() { - let _foo = str::trim_left(" aoeu"); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] + let _foo = str::trim_left(" aoeu"); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] - let _bar = " aoeu".trim_left(); //~ ERROR use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] + let _bar = " aoeu".trim_left(); //~ ERROR use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` [deprecated] } diff --git a/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr b/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr index 8d4529526..3b518d180 100644 --- a/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr +++ b/tests/ui/deprecation/issue-84637-deprecated-associated-function.stderr @@ -1,4 +1,4 @@ -error: use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` +error: use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` --> $DIR/issue-84637-deprecated-associated-function.rs:6:21 | LL | let _foo = str::trim_left(" aoeu"); @@ -9,18 +9,18 @@ note: the lint level is defined here | LL | #![deny(deprecated)] | ^^^^^^^^^^ -help: replace the use of the deprecated associated function +help: replace the use of the deprecated method | LL | let _foo = str::trim_start(" aoeu"); | ~~~~~~~~~~ -error: use of deprecated associated function `core::str::<impl str>::trim_left`: superseded by `trim_start` +error: use of deprecated method `core::str::<impl str>::trim_left`: superseded by `trim_start` --> $DIR/issue-84637-deprecated-associated-function.rs:8:26 | LL | let _bar = " aoeu".trim_left(); | ^^^^^^^^^ | -help: replace the use of the deprecated associated function +help: replace the use of the deprecated method | LL | let _bar = " aoeu".trim_start(); | ~~~~~~~~~~ diff --git a/tests/ui/deprecation/suggestion.stderr b/tests/ui/deprecation/suggestion.stderr index c5f2fc091..5584b6d2f 100644 --- a/tests/ui/deprecation/suggestion.stderr +++ b/tests/ui/deprecation/suggestion.stderr @@ -14,13 +14,13 @@ help: replace the use of the deprecated function LL | bar::replacement(); | ~~~~~~~~~~~ -error: use of deprecated associated function `Foo::deprecated`: replaced by `replacement` +error: use of deprecated method `Foo::deprecated`: replaced by `replacement` --> $DIR/suggestion.rs:40:9 | LL | foo.deprecated(); | ^^^^^^^^^^ | -help: replace the use of the deprecated associated function +help: replace the use of the deprecated method | LL | foo.replacement(); | ~~~~~~~~~~~ |