diagnostics: update test cases to refer to assoc fn with `self` as method

This commit is contained in:
Michael Howell 2023-02-21 14:11:08 -07:00
parent 3d056c3125
commit 3f374128ee
133 changed files with 656 additions and 642 deletions

View File

@ -6,7 +6,7 @@ LL | qux.foo(a, b, c, d, e, f, g, h, i, j, k, l);
| |
| arguments to this method are incorrect
|
note: associated function defined here
note: method defined here
--> $DIR/too-long.rs:4:8
|
LL | fn foo(

View File

@ -34,7 +34,7 @@ LL | fn f() { ModelT.chip_paint(Blue); }
| |
| arguments to this method are incorrect
|
note: associated function defined here
note: method defined here
--> $DIR/associated-type-projection-from-supertrait.rs:12:8
|
LL | fn chip_paint(&self, c: Self::Color) { }
@ -48,7 +48,7 @@ LL | fn g() { ModelU.chip_paint(Black); }
| |
| arguments to this method are incorrect
|
note: associated function defined here
note: method defined here
--> $DIR/associated-type-projection-from-supertrait.rs:12:8
|
LL | fn chip_paint(&self, c: Self::Color) { }

View File

@ -12,7 +12,7 @@ impl Struct {
pub async fn run_dummy_fn(&self) {
foo(|| self.bar()).await;
//~^ ERROR closure may outlive the current function
//~| ERROR borrowed data escapes outside of associated function
//~| ERROR borrowed data escapes outside of method
}
pub fn bar(&self) {}

View File

@ -16,18 +16,18 @@ help: to force the closure to take ownership of `self` (and any other referenced
LL | foo(move || self.bar()).await;
| ++++
error[E0521]: borrowed data escapes outside of associated function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-62097.rs:13:9
|
LL | pub async fn run_dummy_fn(&self) {
| -----
| |
| `self` is a reference that is only valid in the associated function body
| `self` is a reference that is only valid in the method body
| let's call the lifetime of this reference `'1`
LL | foo(|| self.bar()).await;
| ^^^^^^^^^^^^^^^^^^
| |
| `self` escapes the associated function body here
| `self` escapes the method body here
| argument requires that `'1` must outlive `'static`
error: aborting due to 2 previous errors

View File

@ -1,10 +1,10 @@
error[E0521]: borrowed data escapes outside of associated function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-72312.rs:12:9
|
LL | pub async fn start(&self) {
| -----
| |
| `self` is a reference that is only valid in the associated function body
| `self` is a reference that is only valid in the method body
| let's call the lifetime of this reference `'1`
...
LL | / require_static(async move {
@ -15,7 +15,7 @@ LL | | &self;
LL | | });
| | ^
| | |
| |__________`self` escapes the associated function body here
| |__________`self` escapes the method body here
| argument requires that `'1` must outlive `'static`
error: aborting due to previous error

View File

@ -12,7 +12,7 @@ impl StructA {
async fn foo(&self) {
let bar = self.b.bar().await;
spawn_blocking(move || {
//~^ ERROR borrowed data escapes outside of associated function
//~^ ERROR borrowed data escapes outside of method
self.b;
//~^ ERROR cannot move out of `self.b`, as `self` is a captured variable in an `Fn` closure
})

View File

@ -10,13 +10,13 @@ LL |
LL | self.b;
| ^^^^^^ move occurs because `self.b` has type `StructB`, which does not implement the `Copy` trait
error[E0521]: borrowed data escapes outside of associated function
error[E0521]: borrowed data escapes outside of method
--> $DIR/issue-103624.rs:14:9
|
LL | async fn foo(&self) {
| -----
| |
| `self` is a reference that is only valid in the associated function body
| `self` is a reference that is only valid in the method body
| let's call the lifetime of this reference `'1`
LL | let bar = self.b.bar().await;
LL | / spawn_blocking(move || {
@ -26,7 +26,7 @@ LL | |
LL | | })
| | ^
| | |
| |__________`self` escapes the associated function body here
| |__________`self` escapes the method body here
| argument requires that `'1` must outlive `'static`
error: aborting due to 2 previous errors

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-105608.rs:13:22
|
LL | Combination::<0>.and::<_>().and::<_>();
| ^^^ cannot infer type of the type parameter `M` declared on the associated function `and`
| ^^^ cannot infer type of the type parameter `M` declared on the method `and`
|
help: consider specifying the generic argument
|

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/method-chain.rs:15:33
|
LL | Foo.bar().bar().bar().bar().baz();
| ^^^ cannot infer the value of the const parameter `N` declared on the associated function `baz`
| ^^^ cannot infer the value of the const parameter `N` declared on the method `baz`
|
help: consider specifying the generic argument
|

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/uninferred-consts.rs:9:9
|
LL | Foo.foo();
| ^^^ cannot infer the value of the const parameter `A` declared on the associated function `foo`
| ^^^ cannot infer the value of the const parameter `A` declared on the method `foo`
|
help: consider specifying the generic arguments
|

View File

@ -4,7 +4,7 @@ struct S;
fn main() {
let _: u32 = 5i32.try_into::<32>().unwrap();
//~^ ERROR this associated function takes
//~^ ERROR this method takes
S.f::<0>();
//~^ ERROR no method named `f`

View File

@ -1,4 +1,4 @@
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/invalid-const-arg-for-type-param.rs:6:23
|
LL | let _: u32 = 5i32.try_into::<32>().unwrap();

View File

@ -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")]

View File

@ -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);
| ^^^^^^^^^^^^^^^^^^^^^^
error: use of deprecated associated function `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::MethodTester::method_deprecated_text`: text
--> $DIR/deprecation-lint.rs:257:16
|
LL | <Foo>::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
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();

View File

@ -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]
}

View File

@ -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]
}

View File

@ -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();
| ~~~~~~~~~~

View File

@ -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();
| ~~~~~~~~~~~

View File

@ -8,5 +8,5 @@ mod inner {
fn main() {
let foo = inner::Foo;
foo.method(); //~ ERROR associated function `method` is private [E0624]
foo.method(); //~ ERROR method `method` is private [E0624]
}

View File

@ -1,11 +1,11 @@
error[E0624]: associated function `method` is private
error[E0624]: method `method` is private
--> $DIR/E0624.rs:11:9
|
LL | fn method(&self) {}
| ---------------- private associated function defined here
| ---------------- private method defined here
...
LL | foo.method();
| ^^^^^^ private associated function
| ^^^^^^ private method
error: aborting due to previous error

View File

@ -79,38 +79,38 @@ LL | r.unstable_undeclared();
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0624]: associated function `pub_crate` is private
error[E0624]: method `pub_crate` is private
--> $DIR/explore-issue-38412.rs:48:7
|
LL | r.pub_crate();
| ^^^^^^^^^ private associated function
| ^^^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:114:9
|
LL | pub(crate) fn pub_crate(&self) -> i32 { self.d_priv }
| ------------------------------------- private associated function defined here
| ------------------------------------- private method defined here
error[E0624]: associated function `pub_mod` is private
error[E0624]: method `pub_mod` is private
--> $DIR/explore-issue-38412.rs:49:7
|
LL | r.pub_mod();
| ^^^^^^^ private associated function
| ^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:116:9
|
LL | pub(in m) fn pub_mod(&self) -> i32 { self.d_priv }
| ---------------------------------- private associated function defined here
| ---------------------------------- private method defined here
error[E0624]: associated function `private` is private
error[E0624]: method `private` is private
--> $DIR/explore-issue-38412.rs:50:7
|
LL | r.private();
| ^^^^^^^ private associated function
| ^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:118:9
|
LL | fn private(&self) -> i32 { self.d_priv }
| ------------------------ private associated function defined here
| ------------------------ private method defined here
error[E0658]: use of unstable library feature 'unstable_undeclared'
--> $DIR/explore-issue-38412.rs:55:7
@ -130,38 +130,38 @@ LL | t.unstable_undeclared();
= note: see issue #38412 <https://github.com/rust-lang/rust/issues/38412> for more information
= help: add `#![feature(unstable_undeclared)]` to the crate attributes to enable
error[E0624]: associated function `pub_crate` is private
error[E0624]: method `pub_crate` is private
--> $DIR/explore-issue-38412.rs:61:7
|
LL | t.pub_crate();
| ^^^^^^^^^ private associated function
| ^^^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:129:9
|
LL | pub(crate) fn pub_crate(&self) -> i32 { self.0 }
| ------------------------------------- private associated function defined here
| ------------------------------------- private method defined here
error[E0624]: associated function `pub_mod` is private
error[E0624]: method `pub_mod` is private
--> $DIR/explore-issue-38412.rs:62:7
|
LL | t.pub_mod();
| ^^^^^^^ private associated function
| ^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:130:9
|
LL | pub(in m) fn pub_mod(&self) -> i32 { self.0 }
| ---------------------------------- private associated function defined here
| ---------------------------------- private method defined here
error[E0624]: associated function `private` is private
error[E0624]: method `private` is private
--> $DIR/explore-issue-38412.rs:63:7
|
LL | t.private();
| ^^^^^^^ private associated function
| ^^^^^^^ private method
|
::: $DIR/auxiliary/pub-and-stability.rs:131:9
|
LL | fn private(&self) -> i32 { self.0 }
| ------------------------ private associated function defined here
| ------------------------ private method defined here
error: aborting due to 19 previous errors

View File

@ -7,7 +7,7 @@ LL | |
LL | | });
| |______- an argument is missing
|
note: associated function defined here
note: method defined here
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
help: provide the argument
|

View File

@ -4,7 +4,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | Pin::new(&mut b).resume();
| ^^^^^^-- an argument of type `()` is missing
|
note: associated function defined here
note: method defined here
--> $SRC_DIR/core/src/ops/generator.rs:LL:COL
help: provide the argument
|

View File

@ -14,16 +14,16 @@ use inference_unstable_itertools::IpuItertools;
fn main() {
assert_eq!('x'.ipu_flatten(), 1);
//~^ WARN an associated function with this name may be added to the standard library in the future
//~^ WARN a method with this name may be added to the standard library in the future
//~| WARN once this associated item is added to the standard library, the ambiguity may cause an
assert_eq!('x'.ipu_by_value_vs_by_ref(), 1);
//~^ WARN an associated function with this name may be added to the standard library in the future
//~^ WARN a method with this name may be added to the standard library in the future
//~| WARN once this associated item is added to the standard library, the ambiguity may cause an
assert_eq!('x'.ipu_by_ref_vs_by_ref_mut(), 1);
//~^ WARN an associated function with this name may be added to the standard library in the future
//~^ WARN a method with this name may be added to the standard library in the future
//~| WARN once this associated item is added to the standard library, the ambiguity may cause an
assert_eq!((&mut 'x' as *mut char).ipu_by_mut_ptr_vs_by_const_ptr(), 1);
//~^ WARN an associated function with this name may be added to the standard library in the future
//~^ WARN a method with this name may be added to the standard library in the future
//~| WARN once this associated item is added to the standard library, the ambiguity may cause an
assert_eq!(char::C, 1);
//~^ WARN an associated constant with this name may be added to the standard library in the future

View File

@ -1,4 +1,4 @@
warning: an associated function with this name may be added to the standard library in the future
warning: a method with this name may be added to the standard library in the future
--> $DIR/inference_unstable.rs:16:20
|
LL | assert_eq!('x'.ipu_flatten(), 1);
@ -10,7 +10,7 @@ LL | assert_eq!('x'.ipu_flatten(), 1);
= help: add `#![feature(ipu_flatten)]` to the crate attributes to enable `inference_unstable_iterator::IpuIterator::ipu_flatten`
= note: `#[warn(unstable_name_collisions)]` on by default
warning: an associated function with this name may be added to the standard library in the future
warning: a method with this name may be added to the standard library in the future
--> $DIR/inference_unstable.rs:19:20
|
LL | assert_eq!('x'.ipu_by_value_vs_by_ref(), 1);
@ -21,7 +21,7 @@ LL | assert_eq!('x'.ipu_by_value_vs_by_ref(), 1);
= help: call with fully qualified syntax `inference_unstable_itertools::IpuItertools::ipu_by_value_vs_by_ref(...)` to keep using the current method
= help: add `#![feature(ipu_flatten)]` to the crate attributes to enable `inference_unstable_iterator::IpuIterator::ipu_by_value_vs_by_ref`
warning: an associated function with this name may be added to the standard library in the future
warning: a method with this name may be added to the standard library in the future
--> $DIR/inference_unstable.rs:22:20
|
LL | assert_eq!('x'.ipu_by_ref_vs_by_ref_mut(), 1);
@ -32,7 +32,7 @@ LL | assert_eq!('x'.ipu_by_ref_vs_by_ref_mut(), 1);
= help: call with fully qualified syntax `inference_unstable_itertools::IpuItertools::ipu_by_ref_vs_by_ref_mut(...)` to keep using the current method
= help: add `#![feature(ipu_flatten)]` to the crate attributes to enable `inference_unstable_iterator::IpuIterator::ipu_by_ref_vs_by_ref_mut`
warning: an associated function with this name may be added to the standard library in the future
warning: a method with this name may be added to the standard library in the future
--> $DIR/inference_unstable.rs:25:40
|
LL | assert_eq!((&mut 'x' as *mut char).ipu_by_mut_ptr_vs_by_const_ptr(), 1);

View File

@ -6,11 +6,11 @@ LL | assert_eq!('x'.ipu_flatten(), 0);
|
= note: candidate #1 is defined in an impl of the trait `IpuIterator` for the type `char`
= note: candidate #2 is defined in an impl of the trait `IpuItertools` for the type `char`
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | assert_eq!(IpuIterator::ipu_flatten(&'x'), 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | assert_eq!(IpuItertools::ipu_flatten(&'x'), 0);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -4,7 +4,7 @@ error[E0283]: type annotations needed
LL | .get(&"key".into())
| ^^^ ------------- type must be known at this point
| |
| cannot infer type of the type parameter `Q` declared on the associated function `get`
| cannot infer type of the type parameter `Q` declared on the method `get`
|
= note: multiple `impl`s satisfying `String: Borrow<_>` found in the following crates: `alloc`, `core`:
- impl Borrow<str> for String;

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/question-mark-type-infer.rs:10:21
|
LL | l.iter().map(f).collect()?
| ^^^^^^^ cannot infer type of the type parameter `B` declared on the associated function `collect`
| ^^^^^^^ cannot infer type of the type parameter `B` declared on the method `collect`
|
help: consider specifying the generic argument
|

View File

@ -10,7 +10,7 @@ LL | c.read_to(v);
|
= note: expected mutable reference `&mut [u8]`
found struct `Vec<_>`
note: associated function defined here
note: method defined here
--> $DIR/issue-11374.rs:13:12
|
LL | pub fn read_to(&mut self, vec: &mut [u8]) {

View File

@ -1,4 +1,4 @@
error: use of deprecated associated function `Foo::foo`: text
error: use of deprecated method `Foo::foo`: text
--> $DIR/issue-17337.rs:16:6
|
LL | .foo();

View File

@ -14,7 +14,7 @@ note: candidate #2 is defined in the trait `T`
|
LL | fn foo(&self);
| ^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | T::foo(&x);
| ~~~~~~~~~~

View File

@ -8,7 +8,7 @@ mod B {
use crate1::A::Foo;
fn bar(f: Foo) {
Foo::foo(&f);
//~^ ERROR: associated function `foo` is private
//~^ ERROR: method `foo` is private
}
}

View File

@ -1,13 +1,13 @@
error[E0624]: associated function `foo` is private
error[E0624]: method `foo` is private
--> $DIR/issue-21202.rs:10:14
|
LL | Foo::foo(&f);
| ^^^ private associated function
| ^^^ private method
|
::: $DIR/auxiliary/issue-21202.rs:4:9
|
LL | fn foo(&self) { }
| ------------- private associated function defined here
| ------------- private method defined here
error: aborting due to previous error

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-23041.rs:6:7
|
LL | b.downcast_ref::<fn(_)->_>();
| ^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the associated function `downcast_ref`
| ^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the method `downcast_ref`
|
help: consider specifying the generic argument
|

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in an impl of the trait `Add` for the type `isize`
|
LL | fn to_int(&self) -> isize { *self }
| ^^^^^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | ToPrimitive::to_int(&self) + other.to_int()
| ~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | Add::to_int(&self) + other.to_int()
| ~~~~~~~~~~~~~~~~~~

View File

@ -20,9 +20,9 @@ fn main() {
let _woohoo = (Box::new(my_struct)).priv_field;
//~^ ERROR field `priv_field` of struct `MyStruct` is private
(&my_struct).happyfun(); //~ ERROR associated function `happyfun` is private
(&my_struct).happyfun(); //~ ERROR method `happyfun` is private
(Box::new(my_struct)).happyfun(); //~ ERROR associated function `happyfun` is private
(Box::new(my_struct)).happyfun(); //~ ERROR method `happyfun` is private
let nope = my_struct.priv_field;
//~^ ERROR field `priv_field` of struct `MyStruct` is private
}

View File

@ -10,23 +10,23 @@ error[E0616]: field `priv_field` of struct `MyStruct` is private
LL | let _woohoo = (Box::new(my_struct)).priv_field;
| ^^^^^^^^^^ private field
error[E0624]: associated function `happyfun` is private
error[E0624]: method `happyfun` is private
--> $DIR/issue-3763.rs:23:18
|
LL | fn happyfun(&self) {}
| ------------------ private associated function defined here
| ------------------ private method defined here
...
LL | (&my_struct).happyfun();
| ^^^^^^^^ private associated function
| ^^^^^^^^ private method
error[E0624]: associated function `happyfun` is private
error[E0624]: method `happyfun` is private
--> $DIR/issue-3763.rs:25:27
|
LL | fn happyfun(&self) {}
| ------------------ private associated function defined here
| ------------------ private method defined here
...
LL | (Box::new(my_struct)).happyfun();
| ^^^^^^^^ private associated function
| ^^^^^^^^ private method
error[E0616]: field `priv_field` of struct `MyStruct` is private
--> $DIR/issue-3763.rs:26:26

View File

@ -8,7 +8,7 @@ LL | b"".starts_with(stringify!(foo))
|
= note: expected reference `&[u8]`
found reference `&'static str`
note: associated function defined here
note: method defined here
--> $SRC_DIR/core/src/slice/mod.rs:LL:COL
= note: this error originates in the macro `stringify` (in Nightly builds, run with -Z macro-backtrace for more info)

View File

@ -9,7 +9,7 @@ impl Borked {
fn run_wild<T>(b: &Borked) {
b.a::<'_, T>();
//~^ ERROR cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
//~| ERROR this associated function takes 0 generic arguments but 1 generic argument
//~| ERROR this method takes 0 generic arguments but 1 generic argument
//~| WARN this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
}

View File

@ -16,7 +16,7 @@ LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(late_bound_lifetime_arguments)]` implied by `#[deny(warnings)]`
error[E0107]: this associated function takes 0 generic arguments but 1 generic argument was supplied
error[E0107]: this method takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/issue-60622.rs:10:7
|
LL | b.a::<'_, T>();
@ -24,7 +24,7 @@ LL | b.a::<'_, T>();
| |
| expected 0 generic arguments
|
note: associated function defined here, with 0 generic parameters
note: method defined here, with 0 generic parameters
--> $DIR/issue-60622.rs:6:8
|
LL | fn a(&self) {}

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in an impl of the trait `await` for the type `r#fn
|
LL | fn r#struct(&self) {
| ^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | async::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | await::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in an impl of the trait `r#await` for the type `r#
|
LL | fn r#struct(&self) {
| ^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | r#async::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | r#await::r#struct(&r#fn {});
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -2,7 +2,7 @@ error[E0284]: type annotations needed
--> $DIR/issue-69455.rs:29:41
|
LL | println!("{}", 23u64.test(xs.iter().sum()));
| ---- ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
| ---- ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
| |
| type must be known at this point
|
@ -16,7 +16,7 @@ error[E0283]: type annotations needed
--> $DIR/issue-69455.rs:29:41
|
LL | println!("{}", 23u64.test(xs.iter().sum()));
| ---- ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
| ---- ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
| |
| required by a bound introduced by this call
|

View File

@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a i32) -> &i32 {
| lifetime `'a` defined here
LL |
LL | x
| ^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| ^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
error: aborting due to previous error

View File

@ -7,7 +7,7 @@ LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo {
| lifetime `'a` defined here
LL |
LL | if true { x } else { self }
| ^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
| ^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1`
error: aborting due to previous error

View File

@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &i32) -> &i32 {
| |
| let's call the lifetime of this reference `'2`
LL | x
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn foo<'a>(&self, x: &Foo) -> &Foo {
| |
| let's call the lifetime of this reference `'2`
LL | if true { x } else { self }
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -11,8 +11,8 @@ struct Foo {
struct Bar;
impl Bar {
fn a(&self) -> i32 { 5 } //~ WARNING: associated function `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: associated function `b` is never used
fn a(&self) -> i32 { 5 } //~ WARNING: method `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: method `b` is never used
}
pub(crate) struct Foo1 {
@ -23,8 +23,8 @@ pub(crate) struct Foo1 {
pub(crate) struct Bar1;
impl Bar1 {
fn a(&self) -> i32 { 5 } //~ WARNING: associated function `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: associated function `b` is never used
fn a(&self) -> i32 { 5 } //~ WARNING: method `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: method `b` is never used
}
pub(crate) struct Foo2 {
@ -35,8 +35,8 @@ pub(crate) struct Foo2 {
pub(crate) struct Bar2;
impl Bar2 {
fn a(&self) -> i32 { 5 } //~ WARNING: associated function `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: associated function `b` is never used
fn a(&self) -> i32 { 5 } //~ WARNING: method `a` is never used
pub fn b(&self) -> i32 { 6 } //~ WARNING: method `b` is never used
}

View File

@ -34,37 +34,37 @@ LL | a: i32,
LL | pub b: i32,
| ^
warning: associated function `a` is never used
warning: method `a` is never used
--> $DIR/issue-85255.rs:14:8
|
LL | fn a(&self) -> i32 { 5 }
| ^
warning: associated function `b` is never used
warning: method `b` is never used
--> $DIR/issue-85255.rs:15:12
|
LL | pub fn b(&self) -> i32 { 6 }
| ^
warning: associated function `a` is never used
warning: method `a` is never used
--> $DIR/issue-85255.rs:26:8
|
LL | fn a(&self) -> i32 { 5 }
| ^
warning: associated function `b` is never used
warning: method `b` is never used
--> $DIR/issue-85255.rs:27:12
|
LL | pub fn b(&self) -> i32 { 6 }
| ^
warning: associated function `a` is never used
warning: method `a` is never used
--> $DIR/issue-85255.rs:38:8
|
LL | fn a(&self) -> i32 { 5 }
| ^
warning: associated function `b` is never used
warning: method `b` is never used
--> $DIR/issue-85255.rs:39:12
|
LL | pub fn b(&self) -> i32 { 6 }

View File

@ -13,7 +13,7 @@ extern "C" {
struct Foo; //~ ERROR: struct `Foo` is never constructed
impl Foo {
fn foo(&self) { //~ ERROR: associated function `foo` is never used
fn foo(&self) { //~ ERROR: method `foo` is never used
bar()
}
}

View File

@ -34,7 +34,7 @@ error: function `blah` is never used
LL | fn blah() {}
| ^^^^
error: associated function `foo` is never used
error: method `foo` is never used
--> $DIR/lint-dead-code-3.rs:16:8
|
LL | fn foo(&self) {

View File

@ -50,8 +50,10 @@ trait B {
}
pub trait C { //~ ERROR: missing documentation for a trait
fn foo(&self); //~ ERROR: missing documentation for an associated function
fn foo_with_impl(&self) {} //~ ERROR: missing documentation for an associated function
fn foo(&self); //~ ERROR: missing documentation for a method
fn foo_with_impl(&self) {} //~ ERROR: missing documentation for a method
fn foo_no_self(); //~ ERROR: missing documentation for an associated function
fn foo_no_self_with_impl() {} //~ ERROR: missing documentation for an associated function
}
#[allow(missing_docs)]

View File

@ -40,101 +40,113 @@ error: missing documentation for a trait
LL | pub trait C {
| ^^^^^^^^^^^
error: missing documentation for an associated function
error: missing documentation for a method
--> $DIR/lint-missing-doc.rs:53:5
|
LL | fn foo(&self);
| ^^^^^^^^^^^^^^
error: missing documentation for an associated function
error: missing documentation for a method
--> $DIR/lint-missing-doc.rs:54:5
|
LL | fn foo_with_impl(&self) {}
| ^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:55:5
|
LL | fn foo_no_self();
| ^^^^^^^^^^^^^^^^^
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:56:5
|
LL | fn foo_no_self_with_impl() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for an associated type
--> $DIR/lint-missing-doc.rs:64:5
--> $DIR/lint-missing-doc.rs:66:5
|
LL | type AssociatedType;
| ^^^^^^^^^^^^^^^^^^^
error: missing documentation for an associated type
--> $DIR/lint-missing-doc.rs:65:5
--> $DIR/lint-missing-doc.rs:67:5
|
LL | type AssociatedTypeDef = Self;
| ^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for an associated function
--> $DIR/lint-missing-doc.rs:81:5
--> $DIR/lint-missing-doc.rs:83:5
|
LL | pub fn foo() {}
| ^^^^^^^^^^^^
error: missing documentation for an enum
--> $DIR/lint-missing-doc.rs:118:1
--> $DIR/lint-missing-doc.rs:120:1
|
LL | pub enum PubBaz {
| ^^^^^^^^^^^^^^^
error: missing documentation for a variant
--> $DIR/lint-missing-doc.rs:119:5
--> $DIR/lint-missing-doc.rs:121:5
|
LL | PubBazA {
| ^^^^^^^
error: missing documentation for a struct field
--> $DIR/lint-missing-doc.rs:120:9
--> $DIR/lint-missing-doc.rs:122:9
|
LL | a: isize,
| ^^^^^^^^
error: missing documentation for a constant
--> $DIR/lint-missing-doc.rs:151:1
--> $DIR/lint-missing-doc.rs:153:1
|
LL | pub const FOO4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^
error: missing documentation for a static
--> $DIR/lint-missing-doc.rs:161:1
--> $DIR/lint-missing-doc.rs:163:1
|
LL | pub static BAR4: u32 = 0;
| ^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a function
--> $DIR/lint-missing-doc.rs:167:5
--> $DIR/lint-missing-doc.rs:169:5
|
LL | pub fn undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a function
--> $DIR/lint-missing-doc.rs:168:5
--> $DIR/lint-missing-doc.rs:170:5
|
LL | pub fn undocumented2() {}
| ^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a function
--> $DIR/lint-missing-doc.rs:174:9
--> $DIR/lint-missing-doc.rs:176:9
|
LL | pub fn also_undocumented1() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a function
--> $DIR/lint-missing-doc.rs:189:5
--> $DIR/lint-missing-doc.rs:191:5
|
LL | pub fn extern_fn_undocumented(f: f32) -> f32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a static
--> $DIR/lint-missing-doc.rs:194:5
--> $DIR/lint-missing-doc.rs:196:5
|
LL | pub static EXTERN_STATIC_UNDOCUMENTED: u8;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: missing documentation for a foreign type
--> $DIR/lint-missing-doc.rs:199:5
--> $DIR/lint-missing-doc.rs:201:5
|
LL | pub type ExternTyUndocumented;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 22 previous errors
error: aborting due to 24 previous errors

View File

@ -22,40 +22,40 @@ mod cross_crate {
let foo = MethodTester;
deprecated(); //~ WARN use of deprecated function `lint_stability::deprecated`
foo.method_deprecated(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
Foo::method_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
<Foo>::method_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated`
foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
foo.method_deprecated(); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated`
Foo::method_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated`
<Foo>::method_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated`
foo.trait_deprecated(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
deprecated_text(); //~ WARN use of deprecated function `lint_stability::deprecated_text`: text
foo.method_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
Foo::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
<Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
foo.method_deprecated_text(); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
Foo::method_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
<Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
foo.trait_deprecated_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
deprecated_unstable(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable`
foo.method_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
Foo::method_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
<Foo>::method_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`
foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
<Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
foo.method_deprecated_unstable(); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`
Foo::method_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`
<Foo>::method_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`
foo.trait_deprecated_unstable(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
<Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
deprecated_unstable_text(); //~ WARN use of deprecated function `lint_stability::deprecated_unstable_text`: text
foo.method_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
Foo::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
<Foo>::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
foo.method_deprecated_unstable_text(); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
Foo::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
<Foo>::method_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
unstable();
foo.method_unstable();
@ -141,22 +141,22 @@ mod cross_crate {
}
fn test_method_param<Foo: Trait>(foo: Foo) {
foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
<Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
foo.trait_deprecated(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
foo.trait_deprecated_unstable(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
Trait::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
<Foo>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
<Foo as Trait>::trait_deprecated_unstable(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
Trait::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
<Foo as Trait>::trait_deprecated_unstable_text(&foo); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
foo.trait_unstable();
Trait::trait_unstable(&foo);
<Foo>::trait_unstable(&foo);
@ -172,10 +172,10 @@ mod cross_crate {
}
fn test_method_object(foo: &dyn Trait) {
foo.trait_deprecated(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
foo.trait_deprecated_unstable(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
foo.trait_deprecated(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
foo.trait_deprecated_unstable(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`
foo.trait_deprecated_unstable_text(); //~ WARN use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
foo.trait_unstable();
foo.trait_unstable_text();
foo.trait_stable();
@ -328,22 +328,22 @@ mod this_crate {
let foo = MethodTester;
deprecated(); //~ WARN use of deprecated function `this_crate::deprecated`
foo.method_deprecated(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
Foo::method_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
<Foo>::method_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated`
foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
foo.method_deprecated(); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated`
Foo::method_deprecated(&foo); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated`
<Foo>::method_deprecated(&foo); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated`
foo.trait_deprecated(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
deprecated_text(); //~ WARN use of deprecated function `this_crate::deprecated_text`: text
foo.method_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
Foo::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
<Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
foo.method_deprecated_text(); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
Foo::method_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
<Foo>::method_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
foo.trait_deprecated_text(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
unstable();
foo.method_unstable();
@ -402,14 +402,14 @@ mod this_crate {
}
fn test_method_param<Foo: Trait>(foo: Foo) {
foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
foo.trait_deprecated(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
Trait::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
<Foo>::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
<Foo as Trait>::trait_deprecated(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
Trait::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
<Foo>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
<Foo as Trait>::trait_deprecated_text(&foo); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
foo.trait_unstable();
Trait::trait_unstable(&foo);
<Foo>::trait_unstable(&foo);
@ -425,8 +425,8 @@ mod this_crate {
}
fn test_method_object(foo: &dyn Trait) {
foo.trait_deprecated(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
foo.trait_deprecated(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated`
foo.trait_deprecated_text(); //~ WARN use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
foo.trait_unstable();
foo.trait_unstable_text();
foo.trait_stable();

View File

@ -10,13 +10,13 @@ note: the lint level is defined here
LL | #![warn(deprecated)]
| ^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:29:16
|
LL | Trait::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:31:25
|
LL | <Foo as Trait>::trait_deprecated(&foo);
@ -28,17 +28,17 @@ warning: use of deprecated function `lint_stability::deprecated_text`: text
LL | deprecated_text();
| ^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:38:16
|
LL | ... Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:40:25
|
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated function `lint_stability::deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:42:9
@ -46,13 +46,13 @@ warning: use of deprecated function `lint_stability::deprecated_unstable`: text
LL | deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:47:16
|
LL | ... Trait::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | Trait::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:49:25
|
LL | ... <Foo as Trait>::trait_deprecated_unstable(&foo);
@ -64,13 +64,13 @@ warning: use of deprecated function `lint_stability::deprecated_unstable_text`:
LL | deprecated_unstable_text();
| ^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:56:16
|
LL | ... Trait::trait_deprecated_unstable_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:58:25
|
LL | ... <Foo as Trait>::trait_deprecated_unstable_text(&foo);
@ -142,49 +142,49 @@ warning: use of deprecated function `lint_stability::deprecated_text`: text
LL | macro_test_arg!(macro_test_arg!(deprecated_text()));
| ^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:145:16
|
LL | Trait::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:147:25
|
LL | <Foo as Trait>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:149:16
|
LL | ... Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:151:25
|
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:153:16
|
LL | ... Trait::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | Trait::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:155:25
|
LL | ... <Foo as Trait>::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:157:16
|
LL | ... Trait::trait_deprecated_unstable_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:159:25
|
LL | ... <Foo as Trait>::trait_deprecated_unstable_text(&foo);
@ -214,13 +214,13 @@ warning: use of deprecated function `this_crate::deprecated`: text
LL | deprecated();
| ^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:335:16
|
LL | Trait::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:337:25
|
LL | <Foo as Trait>::trait_deprecated(&foo);
@ -232,17 +232,17 @@ warning: use of deprecated function `this_crate::deprecated_text`: text
LL | deprecated_text();
| ^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:344:16
|
LL | Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:346:25
|
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated struct `this_crate::DeprecatedStruct`: text
--> $DIR/lint-stability-deprecated.rs:384:17
@ -268,29 +268,29 @@ warning: use of deprecated tuple struct `this_crate::DeprecatedTupleStruct`: tex
LL | let _ = DeprecatedTupleStruct (1);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:406:16
|
LL | Trait::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:408:25
|
LL | <Foo as Trait>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:410:16
|
LL | Trait::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:412:25
|
LL | ... <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo as Trait>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated function `this_crate::test_fn_body::fn_in_body`: text
--> $DIR/lint-stability-deprecated.rs:439:9
@ -328,121 +328,121 @@ warning: use of deprecated associated type `lint_stability::TraitWithAssociatedT
LL | TypeDeprecated = u16,
| ^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:25:13
|
LL | foo.method_deprecated();
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:26:14
|
LL | Foo::method_deprecated(&foo);
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:27:16
|
LL | <Foo>::method_deprecated(&foo);
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:28:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:30:16
|
LL | <Foo>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:34:13
|
LL | ... foo.method_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^^
LL | foo.method_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:35:14
|
LL | ... Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:36:16
|
LL | ... <Foo>::method_deprecated_text(&foo);
LL | Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:36:16
|
LL | <Foo>::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:37:13
|
LL | foo.trait_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:39:16
|
LL | ... <Foo>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:43:13
|
LL | ... foo.method_deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | foo.method_deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:44:14
|
LL | ... Foo::method_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
LL | Foo::method_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:45:16
|
LL | ... <Foo>::method_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:46:13
|
LL | foo.trait_deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:48:16
|
LL | ... <Foo>::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | <Foo>::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:52:13
|
LL | ... foo.method_deprecated_unstable_text();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:53:14
|
LL | ... Foo::method_deprecated_unstable_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::MethodTester::method_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::MethodTester::method_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:54:16
|
LL | ... <Foo>::method_deprecated_unstable_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:55:13
|
LL | ... foo.trait_deprecated_unstable_text();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:57:16
|
LL | ... <Foo>::trait_deprecated_unstable_text(&foo);
@ -460,133 +460,133 @@ warning: use of deprecated field `lint_stability::DeprecatedUnstableStruct::i`:
LL | i: 0
| ^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:144:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:146:16
|
LL | <Foo>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:148:13
|
LL | foo.trait_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:150:16
|
LL | ... <Foo>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
LL | <Foo>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:152:13
|
LL | foo.trait_deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:154:16
|
LL | ... <Foo>::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
LL | <Foo>::trait_deprecated_unstable(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:156:13
|
LL | ... foo.trait_deprecated_unstable_text();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:158:16
|
LL | ... <Foo>::trait_deprecated_unstable_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:175:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:176:13
|
LL | foo.trait_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable`: text
--> $DIR/lint-stability-deprecated.rs:177:13
|
LL | foo.trait_deprecated_unstable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `lint_stability::Trait::trait_deprecated_unstable_text`: text
warning: use of deprecated method `lint_stability::Trait::trait_deprecated_unstable_text`: text
--> $DIR/lint-stability-deprecated.rs:178:13
|
LL | ... foo.trait_deprecated_unstable_text();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:331:13
|
LL | foo.method_deprecated();
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:332:14
|
LL | Foo::method_deprecated(&foo);
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:333:16
|
LL | <Foo>::method_deprecated(&foo);
| ^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:334:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:336:16
|
LL | <Foo>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:340:13
|
LL | ... foo.method_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^^
LL | foo.method_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:341:14
|
LL | ... Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:342:16
|
LL | ... <Foo>::method_deprecated_text(&foo);
LL | Foo::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::MethodTester::method_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:342:16
|
LL | <Foo>::method_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:343:13
|
LL | foo.trait_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:345:16
|
LL | <Foo>::trait_deprecated_text(&foo);
@ -598,37 +598,37 @@ warning: use of deprecated field `this_crate::DeprecatedStruct::i`: text
LL | i: 0
| ^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:405:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:407:16
|
LL | <Foo>::trait_deprecated(&foo);
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:409:13
|
LL | foo.trait_deprecated_text();
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:411:16
|
LL | <Foo>::trait_deprecated_text(&foo);
| ^^^^^^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated`: text
--> $DIR/lint-stability-deprecated.rs:428:13
|
LL | foo.trait_deprecated();
| ^^^^^^^^^^^^^^^^
warning: use of deprecated associated function `this_crate::Trait::trait_deprecated_text`: text
warning: use of deprecated method `this_crate::Trait::trait_deprecated_text`: text
--> $DIR/lint-stability-deprecated.rs:429:13
|
LL | foo.trait_deprecated_text();

View File

@ -6,7 +6,7 @@ LL | impl<'b> S<'b> {
LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
| -- lifetime `'a` defined here
LL | match self.0 { ref mut x => x }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of a mutable reference to `&i32`

View File

@ -7,7 +7,7 @@ LL | fn bar<'a>(&'a mut self) -> &'a mut &'a i32 {
| -- lifetime `'a` defined here
LL | let ref mut x = self.0;
LL | x
| ^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
| ^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`
= note: requirement occurs because of a mutable reference to `&i32`

View File

@ -27,7 +27,7 @@ LL | 1.query::<dyn ToString>("")
|
= note: expected trait object `dyn ToString`
found reference `&'static str`
note: associated function defined here
note: method defined here
--> $DIR/issue-61525.rs:2:8
|
LL | fn query<Q>(self, q: Q);

View File

@ -10,11 +10,11 @@ note: candidate #2 is defined in an impl of the trait `Me2` for the type `usize`
|
LL | impl Me2 for usize { fn me(&self) -> usize { *self } }
| ^^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | fn main() { Me::me(&1_usize); }
| ~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | fn main() { Me2::me(&1_usize); }
| ~~~~~~~~~~~~~~~~~

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in the trait `B`
|
LL | trait B { fn foo(&self); }
| ^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | A::foo(t);
| ~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | B::foo(t);
| ~~~~~~~~~

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in an impl of the trait `B` for the type `AB`
|
LL | fn foo(self) {}
| ^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | A::foo(AB {});
| ~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | B::foo(AB {});
| ~~~~~~~~~~~~~

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in an impl of the trait `Bar` for the type `usize`
|
LL | trait Bar { fn method(&self) {} }
| ^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | Foo::method(&1_usize);
| ~~~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | Bar::method(&1_usize);
| ~~~~~~~~~~~~~~~~~~~~~

View File

@ -7,7 +7,7 @@ LL | x.zero(0)
| unexpected argument of type `{integer}`
| help: remove the extra argument
|
note: associated function defined here
note: method defined here
--> $DIR/method-call-err-msg.rs:5:8
|
LL | fn zero(self) -> Foo { self }
@ -19,7 +19,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | .one()
| ^^^-- an argument of type `isize` is missing
|
note: associated function defined here
note: method defined here
--> $DIR/method-call-err-msg.rs:6:8
|
LL | fn one(self, _: isize) -> Foo { self }
@ -35,7 +35,7 @@ error[E0061]: this method takes 2 arguments but 1 argument was supplied
LL | .two(0);
| ^^^--- an argument of type `isize` is missing
|
note: associated function defined here
note: method defined here
--> $DIR/method-call-err-msg.rs:7:8
|
LL | fn two(self, _: isize, _: isize) -> Foo { self }
@ -72,7 +72,7 @@ error[E0061]: this method takes 3 arguments but 0 arguments were supplied
LL | y.three::<usize>();
| ^^^^^^^^^^^^^^-- three arguments of type `usize`, `usize`, and `usize` are missing
|
note: associated function defined here
note: method defined here
--> $DIR/method-call-err-msg.rs:8:8
|
LL | fn three<T>(self, _: T, _: T, _: T) -> Foo { self }

View File

@ -14,9 +14,9 @@ impl S {
fn method_call() {
S.early(); // OK
S.early::<'static>();
//~^ ERROR this associated function takes 2 lifetime arguments but 1 lifetime argument
//~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument
S.early::<'static, 'static, 'static>();
//~^ ERROR this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
//~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
let _: &u8 = S.life_and_type::<'static>();
S.life_and_type::<u8>();
S.life_and_type::<'static, u8>();
@ -61,9 +61,9 @@ fn ufcs() {
S::early(S); // OK
S::early::<'static>(S);
//~^ ERROR this associated function takes 2 lifetime arguments but 1 lifetime argument
//~^ ERROR this method takes 2 lifetime arguments but 1 lifetime argument
S::early::<'static, 'static, 'static>(S);
//~^ ERROR this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
//~^ ERROR this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
let _: &u8 = S::life_and_type::<'static>(S);
S::life_and_type::<u8>(S);
S::life_and_type::<'static, u8>(S);

View File

@ -1,4 +1,4 @@
error[E0107]: this associated function takes 2 lifetime arguments but 1 lifetime argument was supplied
error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/method-call-lifetime-args-fail.rs:16:7
|
LL | S.early::<'static>();
@ -6,7 +6,7 @@ LL | S.early::<'static>();
| |
| expected 2 lifetime arguments
|
note: associated function defined here, with 2 lifetime parameters: `'a`, `'b`
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
@ -16,7 +16,7 @@ help: add missing lifetime argument
LL | S.early::<'static, 'static>();
| +++++++++
error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
--> $DIR/method-call-lifetime-args-fail.rs:18:7
|
LL | S.early::<'static, 'static, 'static>();
@ -24,7 +24,7 @@ LL | S.early::<'static, 'static, 'static>();
| |
| expected 2 lifetime arguments
|
note: associated function defined here, with 2 lifetime parameters: `'a`, `'b`
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
@ -198,7 +198,7 @@ note: the late bound lifetime parameter is introduced here
LL | fn late_unused_early<'a, 'b>(self) -> &'b u8 { loop {} }
| ^^
error[E0107]: this associated function takes 2 lifetime arguments but 1 lifetime argument was supplied
error[E0107]: this method takes 2 lifetime arguments but 1 lifetime argument was supplied
--> $DIR/method-call-lifetime-args-fail.rs:63:8
|
LL | S::early::<'static>(S);
@ -206,7 +206,7 @@ LL | S::early::<'static>(S);
| |
| expected 2 lifetime arguments
|
note: associated function defined here, with 2 lifetime parameters: `'a`, `'b`
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }
@ -216,7 +216,7 @@ help: add missing lifetime argument
LL | S::early::<'static, 'static>(S);
| +++++++++
error[E0107]: this associated function takes 2 lifetime arguments but 3 lifetime arguments were supplied
error[E0107]: this method takes 2 lifetime arguments but 3 lifetime arguments were supplied
--> $DIR/method-call-lifetime-args-fail.rs:65:8
|
LL | S::early::<'static, 'static, 'static>(S);
@ -224,7 +224,7 @@ LL | S::early::<'static, 'static, 'static>(S);
| |
| expected 2 lifetime arguments
|
note: associated function defined here, with 2 lifetime parameters: `'a`, `'b`
note: method defined here, with 2 lifetime parameters: `'a`, `'b`
--> $DIR/method-call-lifetime-args-fail.rs:6:8
|
LL | fn early<'a, 'b>(self) -> (&'a u8, &'b u8) { loop {} }

View File

@ -44,15 +44,15 @@ note: candidate #3 is defined in the trait `FinalFoo`
|
LL | fn foo(&self) -> u8;
| ^^^^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | let z = X::foo(x);
| ~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | let z = NuisanceFoo::foo(x);
| ~~~~~~~~~~~~~~~~~~~
help: disambiguate the associated function for candidate #3
help: disambiguate the method for candidate #3
|
LL | let z = FinalFoo::foo(x);
| ~~~~~~~~~~~~~~~~

View File

@ -8,7 +8,7 @@ LL | Foo::bar(x);
| | help: consider borrowing here: `&x`
| arguments to this function are incorrect
|
note: associated function defined here
note: method defined here
--> $DIR/method-self-arg-1.rs:6:8
|
LL | fn bar(&self) {}
@ -24,7 +24,7 @@ LL | Foo::bar(&42);
|
= note: expected reference `&Foo`
found reference `&{integer}`
note: associated function defined here
note: method defined here
--> $DIR/method-self-arg-1.rs:6:8
|
LL | fn bar(&self) {}

View File

@ -73,7 +73,7 @@ LL | impl<'a> Bar<'a> {
LL | pub fn get<'b>(&self) -> &'b usize {
| -- lifetime `'b` defined here
LL | self.x
| ^^^^^^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
| ^^^^^^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`
@ -85,7 +85,7 @@ LL | impl<'a> Baz<'a> {
LL | fn get<'b>(&'b self) -> &'a i32 {
| -- lifetime `'b` defined here
LL | self.x
| ^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
| ^^^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
|
= help: consider adding the following bound: `'b: 'a`

View File

@ -106,7 +106,7 @@ mod foo {
//~^ ERROR: associated function `bar` is private
::bar::baz::A.foo2(); //~ ERROR: module `baz` is private
::bar::baz::A.bar2(); //~ ERROR: module `baz` is private
//~^ ERROR: associated function `bar2` is private
//~^ ERROR: method `bar2` is private
let _: isize =
::bar::B::foo(); //~ ERROR: trait `B` is private

View File

@ -190,14 +190,14 @@ LL | fn bar() {}
LL | ::bar::baz::A::bar();
| ^^^ private associated function
error[E0624]: associated function `bar2` is private
error[E0624]: method `bar2` is private
--> $DIR/privacy1.rs:108:23
|
LL | fn bar2(&self) {}
| -------------- private associated function defined here
| -------------- private method defined here
...
LL | ::bar::baz::A.bar2();
| ^^^^ private associated function
| ^^^^ private method
error: aborting due to 18 previous errors

View File

@ -17,5 +17,5 @@ fn f() {
fn main() {
let s = a::Foo { x: 1 };
s.bar();
s.foo(); //~ ERROR associated function `foo` is private
s.foo(); //~ ERROR method `foo` is private
}

View File

@ -1,11 +1,11 @@
error[E0624]: associated function `foo` is private
error[E0624]: method `foo` is private
--> $DIR/private-impl-method.rs:20:7
|
LL | fn foo(&self) {}
| ------------- private associated function defined here
| ------------- private method defined here
...
LL | s.foo();
| ^^^ private associated function
| ^^^ private method
error: aborting due to previous error

View File

@ -4,5 +4,5 @@ use cci_class_5::kitties::cat;
fn main() {
let nyan : cat = cat(52, 99);
nyan.nap(); //~ ERROR associated function `nap` is private
nyan.nap(); //~ ERROR method `nap` is private
}

View File

@ -1,13 +1,13 @@
error[E0624]: associated function `nap` is private
error[E0624]: method `nap` is private
--> $DIR/private-method-cross-crate.rs:7:8
|
LL | nyan.nap();
| ^^^ private associated function
| ^^^ private method
|
::: $DIR/auxiliary/cci_class_5.rs:8:9
|
LL | fn nap(&self) {}
| ------------- private associated function defined here
| ------------- private method defined here
error: aborting due to previous error

View File

@ -10,5 +10,5 @@ mod a {
fn main() {
let x = a::Foo;
x.f(); //~ ERROR associated function `f` is private
x.f(); //~ ERROR method `f` is private
}

View File

@ -1,11 +1,11 @@
error[E0624]: associated function `f` is private
error[E0624]: method `f` is private
--> $DIR/private-method-inherited.rs:13:7
|
LL | fn f(self) {}
| ---------- private associated function defined here
| ---------- private method defined here
...
LL | x.f();
| ^ private associated function
| ^ private method
error: aborting due to previous error

View File

@ -19,5 +19,5 @@ mod kitties {
fn main() {
let nyan : kitties::Cat = kitties::cat(52, 99);
nyan.nap(); //~ ERROR associated function `nap` is private
nyan.nap(); //~ ERROR method `nap` is private
}

View File

@ -1,11 +1,11 @@
error[E0624]: associated function `nap` is private
error[E0624]: method `nap` is private
--> $DIR/private-method.rs:22:8
|
LL | fn nap(&self) {}
| ------------- private associated function defined here
| ------------- private method defined here
...
LL | nyan.nap();
| ^^^ private associated function
| ^^^ private method
error: aborting due to previous error

View File

@ -54,14 +54,14 @@ error[E0616]: field `x` of struct `S` is private
LL | S::default().x;
| ^ private field
error[E0624]: associated function `f` is private
error[E0624]: method `f` is private
--> $DIR/test.rs:32:18
|
LL | pub(super) fn f(&self) {}
| ---------------------- private associated function defined here
| ---------------------- private method defined here
...
LL | S::default().f();
| ^ private associated function
| ^ private method
error[E0624]: associated function `g` is private
--> $DIR/test.rs:33:8
@ -84,27 +84,27 @@ error[E0616]: field `z` of struct `Universe` is private
LL | let _ = u.z;
| ^ private field
error[E0624]: associated function `g` is private
error[E0624]: method `g` is private
--> $DIR/test.rs:45:7
|
LL | u.g();
| ^ private associated function
| ^ private method
|
::: $DIR/auxiliary/pub_restricted.rs:12:5
|
LL | pub(crate) fn g(&self) {}
| ---------------------- private associated function defined here
| ---------------------- private method defined here
error[E0624]: associated function `h` is private
error[E0624]: method `h` is private
--> $DIR/test.rs:46:7
|
LL | u.h();
| ^ private associated function
| ^ private method
|
::: $DIR/auxiliary/pub_restricted.rs:13:5
|
LL | pub(crate) fn h(&self) {}
| ---------------------- private associated function defined here
| ---------------------- private method defined here
error: aborting due to 12 previous errors

View File

@ -6,7 +6,7 @@ LL | impl<'a> Box<'a> {
LL | fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize {
| -- lifetime `'b` defined here
LL | g2.get()
| ^^^^^^^^ associated function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
| ^^^^^^^^ method was supposed to return data with lifetime `'a` but it is returning data with lifetime `'b`
|
= help: consider adding the following bound: `'b: 'a`

View File

@ -9,7 +9,7 @@ LL | / match self.next {
LL | | Some(ref next) => next.get(),
LL | | None => &self.val
LL | | }
| |_________^ associated function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
| |_________^ method was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`
|
= help: consider adding the following bound: `'a: 'b`

View File

@ -2,7 +2,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:8:52
|
LL | async fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
| - - ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -16,7 +16,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:11:75
|
LL | async fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
| - - ^^^^^^^^^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -30,7 +30,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch-async.rs:17:64
|
LL | async fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| -- - ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| -- - ^^^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| | |
| | let's call the lifetime of this reference `'1`
| lifetime `'a` defined here

View File

@ -2,7 +2,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:6:46
|
LL | fn a(self: Pin<&Foo>, f: &Foo) -> &Foo { f }
| - - ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -16,7 +16,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:9:69
|
LL | fn c(self: Pin<&Self>, f: &Foo, g: &Foo) -> (Pin<&Foo>, &Foo) { (self, f) }
| - - ^^^^^^^^^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| - - ^^^^^^^^^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| | |
| | let's call the lifetime of this reference `'1`
| let's call the lifetime of this reference `'2`
@ -30,7 +30,7 @@ error: lifetime may not live long enough
--> $DIR/arbitrary_self_types_pin_lifetime_mismatch.rs:15:58
|
LL | fn bar<'a>(self: Alias<&Self>, arg: &'a ()) -> &() { arg }
| -- ---- has type `Pin<&'1 Foo>` ^^^ associated function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| -- ---- has type `Pin<&'1 Foo>` ^^^ method was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a`
| |
| lifetime `'a` defined here

View File

@ -6,7 +6,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | async fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | fn box_pin_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | async fn ref_self(&mut self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | async fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | async fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | async fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | async fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | async fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&mut self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | fn ref_Self(self: &mut Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | fn box_ref_Self(self: Box<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | fn pin_ref_Self(self: Pin<&mut Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | fn box_pin_ref_Self(self: Box<Pin<&mut Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | async fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | async fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | async fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | async fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn ref_Struct(self: &mut Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | fn box_ref_Struct(self: Box<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | fn pin_ref_Struct(self: Pin<&mut Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | fn box_box_ref_Struct(self: Box<Box<&mut Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | fn box_pin_ref_Struct(self: Box<Pin<&mut Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | async fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | async fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | async fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | async fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | async fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | async fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -96,7 +96,7 @@ LL | async fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn ref_self(&self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | fn ref_Self(self: &Self, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | fn box_ref_Self(self: Box<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | fn pin_ref_Self(self: Pin<&Self>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | fn box_box_ref_Self(self: Box<Box<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -81,7 +81,7 @@ LL | fn box_pin_ref_Self(self: Box<Pin<&Self>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -96,7 +96,7 @@ LL | fn wrap_ref_Self_Self(self: Wrap<&Self, Self>, f: &u8) -> &u8 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | async fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | async fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | async fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | async fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | async fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -6,7 +6,7 @@ LL | fn ref_Struct(self: &Struct, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -21,7 +21,7 @@ LL | fn box_ref_Struct(self: Box<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -36,7 +36,7 @@ LL | fn pin_ref_Struct(self: Pin<&Struct>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -51,7 +51,7 @@ LL | fn box_box_ref_Struct(self: Box<Box<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|
@ -66,7 +66,7 @@ LL | fn box_pin_Struct(self: Box<Pin<&Struct>>, f: &u32) -> &u32 {
| |
| let's call the lifetime of this reference `'2`
LL | f
| ^ associated function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
| ^ method was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1`
|
help: consider introducing a named lifetime parameter and update trait if needed
|

View File

@ -14,11 +14,11 @@ note: candidate #2 is defined in the trait `B`
|
LL | fn foo(&mut self) {}
| ^^^^^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | A::foo(&a)
| ~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | B::foo(&a)
| ~~~~~~~~~~
@ -39,11 +39,11 @@ note: candidate #2 is defined in the trait `D`
|
LL | fn foo(&self) {}
| ^^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | C::foo(&a)
| ~~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | D::foo(&a)
| ~~~~~~~~~~
@ -64,11 +64,11 @@ note: candidate #2 is defined in the trait `F`
|
LL | fn foo(self) {}
| ^^^^^^^^^^^^
help: disambiguate the associated function for candidate #1
help: disambiguate the method for candidate #1
|
LL | E::foo(a)
| ~~~~~~~~~
help: disambiguate the associated function for candidate #2
help: disambiguate the method for candidate #2
|
LL | F::foo(a)
| ~~~~~~~~~

View File

@ -15,7 +15,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-42234-unknown-receiver-type.rs:15:10
|
LL | .sum::<_>()
| ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
| ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|

View File

@ -15,7 +15,7 @@ error[E0282]: type annotations needed
--> $DIR/issue-42234-unknown-receiver-type.rs:15:10
|
LL | .sum::<_>()
| ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
| ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|

View File

@ -65,7 +65,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | S.baz();
| ^^^-- an argument of type `()` is missing
|
note: associated function defined here
note: method defined here
--> $DIR/missing-unit-argument.rs:6:8
|
LL | fn baz(self, (): ()) { }
@ -81,7 +81,7 @@ error[E0061]: this method takes 1 argument but 0 arguments were supplied
LL | S.generic::<()>();
| ^^^^^^^^^^^^^-- an argument of type `()` is missing
|
note: associated function defined here
note: method defined here
--> $DIR/missing-unit-argument.rs:7:8
|
LL | fn generic<T>(self, _: T) { }

View File

@ -2,7 +2,7 @@ error[E0282]: type annotations needed
--> $DIR/type-annotations-needed-expr.rs:2:39
|
LL | let _ = (vec![1,2,3]).into_iter().sum() as f64;
| ^^^ cannot infer type of the type parameter `S` declared on the associated function `sum`
| ^^^ cannot infer type of the type parameter `S` declared on the method `sum`
|
help: consider specifying the generic argument
|

View File

@ -36,7 +36,7 @@ LL | let y: i32 = i32::max - 42;
| |
| fn(i32, i32) -> i32 {<i32 as Ord>::max}
|
help: use parentheses to call this associated function
help: use parentheses to call this method
|
LL | let y: i32 = i32::max(/* i32 */, /* i32 */) - 42;
| ++++++++++++++++++++++

View File

@ -206,7 +206,7 @@ error[E0308]: mismatched types
--> $DIR/fn-or-tuple-struct-without-args.rs:41:20
|
LL | fn ban(&self) -> usize { 42 }
| ---------------------- associated function `ban` defined here
| ---------------------- method `ban` defined here
...
LL | let _: usize = X::ban;
| ----- ^^^^^^ expected `usize`, found fn item
@ -215,7 +215,7 @@ LL | let _: usize = X::ban;
|
= note: expected type `usize`
found fn item `for<'a> fn(&'a X) -> usize {<X as T>::ban}`
help: use parentheses to call this associated function
help: use parentheses to call this method
|
LL | let _: usize = X::ban(/* &X */);
| ++++++++++
@ -224,7 +224,7 @@ error[E0308]: mismatched types
--> $DIR/fn-or-tuple-struct-without-args.rs:42:20
|
LL | fn bal(&self) -> usize;
| ----------------------- associated function `bal` defined here
| ----------------------- method `bal` defined here
...
LL | let _: usize = X::bal;
| ----- ^^^^^^ expected `usize`, found fn item
@ -233,7 +233,7 @@ LL | let _: usize = X::bal;
|
= note: expected type `usize`
found fn item `for<'a> fn(&'a X) -> usize {<X as T>::bal}`
help: use parentheses to call this associated function
help: use parentheses to call this method
|
LL | let _: usize = X::bal(/* &X */);
| ++++++++++

Some files were not shown because too many files have changed in this diff Show More