File tree 7 files changed +7
-7
lines changed
test/ui/invalid-self-argument
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> {
1828
1828
let mut err = self . struct_span_err ( self . prev_span ,
1829
1829
"unexpected `self` argument in function" ) ;
1830
1830
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" ) ;
1832
1832
return Err ( err) ;
1833
1833
}
1834
1834
Original file line number Diff line number Diff line change 1
1
fn a ( & self ) { }
2
2
//~^ 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
4
4
5
5
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
2
2
--> $DIR/bare-fn-start.rs:1:7
3
3
|
4
4
LL | 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
6
6
7
7
error: aborting due to previous error
8
8
Original file line number Diff line number Diff line change 1
1
fn b ( foo : u32 , & mut self ) { }
2
2
//~^ 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
4
4
5
5
fn main ( ) { }
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
2
2
--> $DIR/bare-fn.rs:1:21
3
3
|
4
4
LL | 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
6
6
7
7
error: aborting due to previous error
8
8
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ struct Foo {}
3
3
impl Foo {
4
4
fn c ( foo : u32 , self ) { }
5
5
//~^ 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
7
7
8
8
fn good ( & mut self , foo : u32 ) { }
9
9
}
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error: unexpected `self` argument in function
2
2
--> $DIR/trait-fn.rs:4:20
3
3
|
4
4
LL | 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
6
6
7
7
error: aborting due to previous error
8
8
You can’t perform that action at this time.
0 commit comments