|
| 1 | +error: unexpected `self` parameter in function |
| 2 | + --> $DIR/error-recovery-mismatch.rs:11:29 |
| 3 | + | |
| 4 | +LL | fn fold<T>(&self, _: T, &self._) {} |
| 5 | + | ^^^^^ must be the first parameter of an associated function |
| 6 | + |
| 7 | +error: expected one of `)` or `,`, found `.` |
| 8 | + --> $DIR/error-recovery-mismatch.rs:11:34 |
| 9 | + | |
| 10 | +LL | fn fold<T>(&self, _: T, &self._) {} |
| 11 | + | ^ |
| 12 | + | | |
| 13 | + | expected one of `)` or `,` |
| 14 | + | help: missing `,` |
| 15 | + |
| 16 | +error[E0415]: identifier `self` is bound more than once in this parameter list |
| 17 | + --> $DIR/error-recovery-mismatch.rs:11:30 |
| 18 | + | |
| 19 | +LL | fn fold<T>(&self, _: T, &self._) {} |
| 20 | + | ^^^^ used as parameter more than once |
| 21 | + |
| 22 | +warning: anonymous parameters are deprecated and will be removed in the next edition |
| 23 | + --> $DIR/error-recovery-mismatch.rs:11:35 |
| 24 | + | |
| 25 | +LL | fn fold<T>(&self, _: T, &self._) {} |
| 26 | + | ^ help: try naming the parameter or explicitly ignoring it: `_: _` |
| 27 | + | |
| 28 | + = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2018! |
| 29 | + = note: for more information, see issue #41686 <https://github.com/rust-lang/rust/issues/41686> |
| 30 | + = note: `#[warn(anonymous_parameters)]` on by default |
| 31 | + |
| 32 | +error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions |
| 33 | + --> $DIR/error-recovery-mismatch.rs:11:35 |
| 34 | + | |
| 35 | +LL | fn fold<T>(&self, _: T, &self._) {} |
| 36 | + | ^ not allowed in type signatures |
| 37 | + | |
| 38 | +help: use type parameters instead |
| 39 | + | |
| 40 | +LL | fn fold<T, U>(&self, _: T, &self.U) {} |
| 41 | + | +++ ~ |
| 42 | + |
| 43 | +error: aborting due to 4 previous errors; 1 warning emitted |
| 44 | + |
| 45 | +Some errors have detailed explanations: E0121, E0415. |
| 46 | +For more information about an error, try `rustc --explain E0121`. |
0 commit comments