File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -1014,11 +1014,7 @@ fn h1() -> i32 {
10141014
10151015E0424 : r##"
10161016The `self` keyword was used inside of an associated function without a "`self`
1017- receiver" parameter. The `self` keyword can only be used inside methods, which
1018- are associated functions (functions defined inside of a `trait` or `impl` block)
1019- that have a `self` receiver as its first parameter, like `self`, `&self`,
1020- `&mut self` or `self: &mut Pin<Self>` (this last one is an example of an
1021- ["abitrary `self` type"](https://github.com/rust-lang/rust/issues/44874)).
1017+ receiver" parameter.
10221018
10231019Erroneous code example:
10241020
@@ -1037,6 +1033,12 @@ impl Foo {
10371033}
10381034```
10391035
1036+ The `self` keyword can only be used inside methods, which are associated
1037+ functions (functions defined inside of a `trait` or `impl` block) that have a
1038+ `self` receiver as its first parameter, like `self`, `&self`, `&mut self` or
1039+ `self: &mut Pin<Self>` (this last one is an example of an ["abitrary `self`
1040+ type"](https://github.com/rust-lang/rust/issues/44874)).
1041+
10401042Check if the associated function's parameter list should have contained a `self`
10411043receiver for it to be a method, and add it if so. Example:
10421044
You can’t perform that action at this time.
0 commit comments