about summary refs log tree commit diff
path: root/src/test/ui/parser/self-in-function-arg.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-3/+0
2019-05-25review comments: move back some methods and clean up wordingEsteban Küber-1/+1
2019-05-25Tweak `self` arg not as first argument of a method diagnosticEsteban Küber-0/+3
Mention that `self` is only valid on "associated functions" ``` 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 ``` When it is a method, mention it must be first ``` error: unexpected `self` argument in function --> $DIR/trait-fn.rs:4:20 | LL | fn c(foo: u32, self) {} | ^^^^ must be the first associated function argument ```