]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/invalid-self-argument/bare-fn-start.stderr
parser: address review comments re. `self`.
[rust.git] / src / test / ui / invalid-self-argument / bare-fn-start.stderr
index 23de6502094f0e7cf5093f4c92e75980856d1475..37753e61f582a790d42af1456412d34b8e3e851f 100644 (file)
@@ -1,10 +1,10 @@
-error: unexpected `self` parameter in function
+error: `self` parameter is only allowed in associated functions
   --> $DIR/bare-fn-start.rs:1:6
    |
 LL | fn a(&self) { }
-   |      ^^^^^ not valid as function parameter
+   |      ^^^^^ not semantically valid as function parameter
    |
-   = note: `self` is only valid as the first parameter of an associated function
+   = note: associated functions are those in `impl` or `trait` definitions
 
 error: aborting due to previous error