add a note to the error message

This commit is contained in:
Axary 2018-11-16 18:43:06 +01:00
parent 4c4aff9b3d
commit 646d68f585
3 changed files with 7 additions and 3 deletions

View file

@ -1,4 +1,5 @@
fn a(&self) { }
//~^ ERROR unexpected `self` argument in bare function
//~| NOTE invalid argument in bare function
fn main() { }

View file

@ -1,8 +1,8 @@
error: unexpected `self` argument in bare function
--> $DIR/bare-function-self.rs:12:11
--> $DIR/bare-function-self.rs:1:7
|
LL | fn a(&self) { }
| ^
| ^^^^ invalid argument in bare function
error: aborting due to previous error