File tree Expand file tree Collapse file tree 7 files changed +7
-7
lines changed
test/ui/invalid-self-argument Expand file tree Collapse file tree 7 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1828,7 +1828,7 @@ impl<'a> Parser<'a> {
18281828 let mut err = self . struct_span_err ( self . prev_span ,
18291829 "unexpected `self` argument in function" ) ;
18301830 err. span_label ( self . prev_span ,
1831- "`self` is only valid as the first argument of a trait function" ) ;
1831+ "`self` is only valid as the first argument of an associated function" ) ;
18321832 return Err ( err) ;
18331833 }
18341834
Original file line number Diff line number Diff line change 11fn a ( & self ) { }
22//~^ ERROR unexpected `self` argument in function
3- //~| NOTE `self` is only valid as the first argument of a trait function
3+ //~| NOTE `self` is only valid as the first argument of an associated function
44
55fn main ( ) { }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
22 --> $DIR/bare-fn-start.rs:1:7
33 |
44LL | fn a(&self) { }
5- | ^^^^ `self` is only valid as the first argument of a trait function
5+ | ^^^^ `self` is only valid as the first argument of an associated function
66
77error: aborting due to previous error
88
Original file line number Diff line number Diff line change 11fn b ( foo : u32 , & mut self ) { }
22//~^ ERROR unexpected `self` argument in function
3- //~| NOTE `self` is only valid as the first argument of a trait function
3+ //~| NOTE `self` is only valid as the first argument of an associated function
44
55fn main ( ) { }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
22 --> $DIR/bare-fn.rs:1:21
33 |
44LL | fn b(foo: u32, &mut self) { }
5- | ^^^^ `self` is only valid as the first argument of a trait function
5+ | ^^^^ `self` is only valid as the first argument of an associated function
66
77error: aborting due to previous error
88
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ struct Foo {}
33impl Foo {
44 fn c ( foo : u32 , self ) { }
55 //~^ ERROR unexpected `self` argument in function
6- //~| NOTE `self` is only valid as the first argument of a trait function
6+ //~| NOTE `self` is only valid as the first argument of an associated function
77
88 fn good ( & mut self , foo : u32 ) { }
99}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
22 --> $DIR/trait-fn.rs:4:20
33 |
44LL | fn c(foo: u32, self) {}
5- | ^^^^ `self` is only valid as the first argument of a trait function
5+ | ^^^^ `self` is only valid as the first argument of an associated function
66
77error: aborting due to previous error
88
You can’t perform that action at this time.
0 commit comments