]> 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 6a878b619d813651d91fa60bb63c34c1481ce960..37753e61f582a790d42af1456412d34b8e3e851f 100644 (file)
@@ -1,8 +1,10 @@
-error: unexpected `self` argument in function
-  --> $DIR/bare-fn-start.rs:1:7
+error: `self` parameter is only allowed in associated functions
+  --> $DIR/bare-fn-start.rs:1:6
    |
 LL | fn a(&self) { }
-   |       ^^^^ `self` is only valid as the first argument of an associated function
+   |      ^^^^^ not semantically valid as function parameter
+   |
+   = note: associated functions are those in `impl` or `trait` definitions
 
 error: aborting due to previous error