diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-05-26 02:13:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-26 02:13:24 +0200 |
| commit | 24cc368118e434719bee711ad34f0a370b27231d (patch) | |
| tree | d6a37033f97a5520b1870f7af75963094f5464dd /src/test/ui/thinlto | |
| parent | f492693982d1e252f5411ae3e4d560ab0dfea48a (diff) | |
| parent | 4e68ddca90a8f3ee580445b1fc83a6a6d0c7f94f (diff) | |
| download | rust-24cc368118e434719bee711ad34f0a370b27231d.tar.gz rust-24cc368118e434719bee711ad34f0a370b27231d.zip | |
Rollup merge of #61087 - estebank:parsepalooza, r=Centril
Tweak `self` arg not as first argument of a method diagnostic
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
```
Move a bunch of error recovery methods to `diagnostics.rs` away from `parser.rs`.
Fix #51547. CC #60015.
Diffstat (limited to 'src/test/ui/thinlto')
0 files changed, 0 insertions, 0 deletions
