mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 15:01:51 +00:00
11 lines
317 B
Plaintext
11 lines
317 B
Plaintext
|
error: unexpected `self` argument in function
|
||
|
--> $DIR/self-in-function-arg.rs:1:15
|
||
|
|
|
||
|
LL | fn foo(x:i32, self: i32) -> i32 { self }
|
||
|
| ^^^^ not valid as function argument
|
||
|
|
|
||
|
= note: `self` is only valid as the first argument of an associated function
|
||
|
|
||
|
error: aborting due to previous error
|
||
|
|