diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-14 18:02:49 +0200 |
|---|---|---|
| committer | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-10-14 18:02:49 +0200 |
| commit | 3a9f8deb1d568baeb2cac503cf8667e3170fb2f8 (patch) | |
| tree | 5e112743443a5893629b89c0f8670d25fc59deb6 /src/libsyntax | |
| parent | 72ad8f716bc2591fba72d7107a9938952214f485 (diff) | |
| download | rust-3a9f8deb1d568baeb2cac503cf8667e3170fb2f8.tar.gz rust-3a9f8deb1d568baeb2cac503cf8667e3170fb2f8.zip | |
recover_intersection_pat: adjust wording
Diffstat (limited to 'src/libsyntax')
| -rw-r--r-- | src/libsyntax/parse/parser/pat.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libsyntax/parse/parser/pat.rs b/src/libsyntax/parse/parser/pat.rs index 55c534e56ce..e288346a329 100644 --- a/src/libsyntax/parse/parser/pat.rs +++ b/src/libsyntax/parse/parser/pat.rs @@ -417,14 +417,14 @@ impl<'a> Parser<'a> { *sub = Some(lhs); self.struct_span_err(sp, "pattern on wrong side of `@`") - .span_label(lhs_span, "pattern on the left, should be to the right") - .span_label(rhs.span, "binding on the right, should be to the left") + .span_label(lhs_span, "pattern on the left, should be on the right") + .span_label(rhs.span, "binding on the right, should be on the left") .span_suggestion(sp, "switch the order", pprust::pat_to_string(&rhs), applicability) .emit(); } else { // The special case above doesn't apply so we may have e.g. `A(x) @ B(y)`. rhs.kind = PatKind::Wild; - self.struct_span_err(sp, "left-hand side of `@` must be a binding pattern") + self.struct_span_err(sp, "left-hand side of `@` must be a binding") .span_label(lhs.span, "interpreted as a pattern, not a binding") .span_label(rhs.span, "also a pattern") .note("bindings are `x`, `mut x`, `ref x`, and `ref mut x`") |
