about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-12-30 07:02:24 +0100
committerMazdak Farrokhzad <twingoow@gmail.com>2019-12-30 13:50:20 +0100
commitab050d6a83a9bdc5856a20402b6ea440d474638c (patch)
tree24e93ba96d75e608b51b03d5aca0b5522fab7360
parent73db83aa70bea7973fa4bb1f025de199a19d5282 (diff)
downloadrust-ab050d6a83a9bdc5856a20402b6ea440d474638c.tar.gz
rust-ab050d6a83a9bdc5856a20402b6ea440d474638c.zip
MatchExpressionArmPattern: Use more generic wording.
The existing wording was inappropriate for e.g.
`if let Ok(_) = expr { .. }`. The diagnostic would
leak the fact that we desugar to a `match`.
-rw-r--r--src/librustc/infer/error_reporting/mod.rs2
-rw-r--r--src/test/ui/block-result/issue-13624.stderr2
-rw-r--r--src/test/ui/error-codes/E0308-4.stderr2
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr2
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr2
-rw-r--r--src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr4
-rw-r--r--src/test/ui/issues/issue-11844.stderr2
-rw-r--r--src/test/ui/issues/issue-12552.stderr2
-rw-r--r--src/test/ui/issues/issue-13466.stderr4
-rw-r--r--src/test/ui/issues/issue-15896.stderr2
-rw-r--r--src/test/ui/issues/issue-16401.stderr2
-rw-r--r--src/test/ui/issues/issue-3680.stderr2
-rw-r--r--src/test/ui/issues/issue-5100.stderr2
-rw-r--r--src/test/ui/issues/issue-5358-1.stderr2
-rw-r--r--src/test/ui/issues/issue-57741-1.stderr4
-rw-r--r--src/test/ui/issues/issue-57741.stderr8
-rw-r--r--src/test/ui/issues/issue-7092.stderr2
-rw-r--r--src/test/ui/match/match-struct.stderr2
-rw-r--r--src/test/ui/match/match-tag-unary.stderr2
-rw-r--r--src/test/ui/parser/pat-tuple-5.stderr2
-rw-r--r--src/test/ui/pattern/pattern-error-continue.stderr2
-rw-r--r--src/test/ui/pattern/pattern-tyvar.stderr2
-rw-r--r--src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr14
-rw-r--r--src/test/ui/structs/structure-constructor-type-mismatch.stderr6
24 files changed, 38 insertions, 38 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index 027143a3d22..f0f0e2cdeb9 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -584,7 +584,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
             ObligationCauseCode::MatchExpressionArmPattern { span, ty } => {
                 if ty.is_suggestable() {
                     // don't show type `_`
-                    err.span_label(span, format!("this match expression has type `{}`", ty));
+                    err.span_label(span, format!("this expression has type `{}`", ty));
                 }
                 if let Some(ty::error::ExpectedFound { found, .. }) = exp_found {
                     if ty.is_box() && ty.boxed_ty() == found {
diff --git a/src/test/ui/block-result/issue-13624.stderr b/src/test/ui/block-result/issue-13624.stderr
index 90ffb4b2e52..416f055251b 100644
--- a/src/test/ui/block-result/issue-13624.stderr
+++ b/src/test/ui/block-result/issue-13624.stderr
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13624.rs:20:9
    |
 LL |       match enum_struct_variant {
-   |             ------------------- this match expression has type `()`
+   |             ------------------- this expression has type `()`
 LL |         a::Enum::EnumStructVariant { x, y, z } => {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found enum `a::Enum`
 
diff --git a/src/test/ui/error-codes/E0308-4.stderr b/src/test/ui/error-codes/E0308-4.stderr
index 46805d6e13b..39c06763737 100644
--- a/src/test/ui/error-codes/E0308-4.stderr
+++ b/src/test/ui/error-codes/E0308-4.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/E0308-4.rs:4:15
    |
 LL |     match x {
-   |           - this match expression has type `u8`
+   |           - this expression has type `u8`
 LL |         0u8..=3i8 => (),
    |         ---   ^^^ expected `u8`, found `i8`
    |         |
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
index 04538cd74b1..580c80f66c3 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision.stderr
@@ -8,7 +8,7 @@ error[E0308]: mismatched types
   --> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
    |
 LL |     match [5..4, 99..105, 43..44] {
-   |           ----------------------- this match expression has type `std::ops::Range<{integer}>`
+   |           ----------------------- this expression has type `std::ops::Range<{integer}>`
 LL |         [_, 99.., _] => {},
    |             ^^ expected struct `std::ops::Range`, found integer
    |
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
index c918d0a385c..88d45f16ff6 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision2.stderr
@@ -14,7 +14,7 @@ error[E0308]: mismatched types
   --> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
    |
 LL |     match [5..4, 99..105, 43..44] {
-   |           ----------------------- this match expression has type `std::ops::Range<{integer}>`
+   |           ----------------------- this expression has type `std::ops::Range<{integer}>`
 LL |         [_, 99..] => {},
    |             ^^ expected struct `std::ops::Range`, found integer
    |
diff --git a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
index e6ee3817b35..6abba7d7cab 100644
--- a/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
+++ b/src/test/ui/exclusive-range/exclusive_range_pattern_syntax_collision3.stderr
@@ -8,7 +8,7 @@ error[E0308]: mismatched types
   --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:12
    |
 LL |     match [5..4, 99..105, 43..44] {
-   |           ----------------------- this match expression has type `std::ops::Range<{integer}>`
+   |           ----------------------- this expression has type `std::ops::Range<{integer}>`
 LL |         [..9, 99..100, _] => {},
    |            ^ expected struct `std::ops::Range`, found integer
    |
@@ -19,7 +19,7 @@ error[E0308]: mismatched types
   --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
    |
 LL |     match [5..4, 99..105, 43..44] {
-   |           ----------------------- this match expression has type `std::ops::Range<{integer}>`
+   |           ----------------------- this expression has type `std::ops::Range<{integer}>`
 LL |         [..9, 99..100, _] => {},
    |               ^^  --- this is of type `{integer}`
    |               |
diff --git a/src/test/ui/issues/issue-11844.stderr b/src/test/ui/issues/issue-11844.stderr
index 1b22d6f45cf..57533ba5e37 100644
--- a/src/test/ui/issues/issue-11844.stderr
+++ b/src/test/ui/issues/issue-11844.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-11844.rs:6:9
    |
 LL |     match a {
-   |           - this match expression has type `std::option::Option<std::boxed::Box<{integer}>>`
+   |           - this expression has type `std::option::Option<std::boxed::Box<{integer}>>`
 LL |         Ok(a) =>
    |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
diff --git a/src/test/ui/issues/issue-12552.stderr b/src/test/ui/issues/issue-12552.stderr
index ecafef259d3..60c4cceac51 100644
--- a/src/test/ui/issues/issue-12552.stderr
+++ b/src/test/ui/issues/issue-12552.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-12552.rs:6:5
    |
 LL |   match t {
-   |         - this match expression has type `std::result::Result<_, {integer}>`
+   |         - this expression has type `std::result::Result<_, {integer}>`
 LL |     Some(k) => match k {
    |     ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
    |
diff --git a/src/test/ui/issues/issue-13466.stderr b/src/test/ui/issues/issue-13466.stderr
index fc20615757a..52d9e2a91b9 100644
--- a/src/test/ui/issues/issue-13466.stderr
+++ b/src/test/ui/issues/issue-13466.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13466.rs:8:9
    |
 LL |     let _x: usize = match Some(1) {
-   |                           ------- this match expression has type `std::option::Option<{integer}>`
+   |                           ------- this expression has type `std::option::Option<{integer}>`
 LL |         Ok(u) => u,
    |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13466.rs:14:9
    |
 LL |     let _x: usize = match Some(1) {
-   |                           ------- this match expression has type `std::option::Option<{integer}>`
+   |                           ------- this expression has type `std::option::Option<{integer}>`
 ...
 LL |         Err(e) => panic!(e)
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
diff --git a/src/test/ui/issues/issue-15896.stderr b/src/test/ui/issues/issue-15896.stderr
index f553be9df55..0ad49ea1e7f 100644
--- a/src/test/ui/issues/issue-15896.stderr
+++ b/src/test/ui/issues/issue-15896.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-15896.rs:11:11
    |
 LL |     let u = match e {
-   |                   - this match expression has type `main::R`
+   |                   - this expression has type `main::R`
 LL |         E::B(
 LL |           Tau{t: x},
    |           ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau`
diff --git a/src/test/ui/issues/issue-16401.stderr b/src/test/ui/issues/issue-16401.stderr
index d3d6108be9d..f8ea0907099 100644
--- a/src/test/ui/issues/issue-16401.stderr
+++ b/src/test/ui/issues/issue-16401.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-16401.rs:8:9
    |
 LL |     match () {
-   |           -- this match expression has type `()`
+   |           -- this expression has type `()`
 LL |         Slice { data: data, len: len } => (),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found struct `Slice`
    |
diff --git a/src/test/ui/issues/issue-3680.stderr b/src/test/ui/issues/issue-3680.stderr
index 8856f0e3a48..713e4b5ccd5 100644
--- a/src/test/ui/issues/issue-3680.stderr
+++ b/src/test/ui/issues/issue-3680.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-3680.rs:3:9
    |
 LL |     match None {
-   |           ---- this match expression has type `std::option::Option<_>`
+   |           ---- this expression has type `std::option::Option<_>`
 LL |         Err(_) => ()
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
diff --git a/src/test/ui/issues/issue-5100.stderr b/src/test/ui/issues/issue-5100.stderr
index 9e1011496c4..c47e8689436 100644
--- a/src/test/ui/issues/issue-5100.stderr
+++ b/src/test/ui/issues/issue-5100.stderr
@@ -29,7 +29,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:33:9
    |
 LL |     match (true, false) {
-   |           ------------- this match expression has type `(bool, bool)`
+   |           ------------- this expression has type `(bool, bool)`
 LL |         box (true, false) => ()
    |         ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box`
    |
diff --git a/src/test/ui/issues/issue-5358-1.stderr b/src/test/ui/issues/issue-5358-1.stderr
index ec79d874d03..314d1fddbd7 100644
--- a/src/test/ui/issues/issue-5358-1.stderr
+++ b/src/test/ui/issues/issue-5358-1.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-5358-1.rs:6:9
    |
 LL |     match S(Either::Left(5)) {
-   |           ------------------ this match expression has type `S`
+   |           ------------------ this expression has type `S`
 LL |         Either::Right(_) => {}
    |         ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either`
    |
diff --git a/src/test/ui/issues/issue-57741-1.stderr b/src/test/ui/issues/issue-57741-1.stderr
index db6fa9db8ff..a4f1ac94825 100644
--- a/src/test/ui/issues/issue-57741-1.stderr
+++ b/src/test/ui/issues/issue-57741-1.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-57741-1.rs:14:9
    |
 LL |     let y = match x {
-   |                   - this match expression has type `std::boxed::Box<u32>`
+   |                   - this expression has type `std::boxed::Box<u32>`
 LL |         S::A { a } | S::B { b: a } => a,
    |         ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-57741-1.rs:14:22
    |
 LL |     let y = match x {
-   |                   - this match expression has type `std::boxed::Box<u32>`
+   |                   - this expression has type `std::boxed::Box<u32>`
 LL |         S::A { a } | S::B { b: a } => a,
    |                      ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
    |
diff --git a/src/test/ui/issues/issue-57741.stderr b/src/test/ui/issues/issue-57741.stderr
index c36dea7bf55..6f9e5b08a83 100644
--- a/src/test/ui/issues/issue-57741.stderr
+++ b/src/test/ui/issues/issue-57741.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL |     let y = match x {
    |                   -
    |                   |
-   |                   this match expression has type `std::boxed::Box<T>`
+   |                   this expression has type `std::boxed::Box<T>`
    |                   help: consider dereferencing the boxed value: `*x`
 LL |         T::A(a) | T::B(a) => a,
    |         ^^^^^^^ expected struct `std::boxed::Box`, found enum `T`
@@ -18,7 +18,7 @@ error[E0308]: mismatched types
 LL |     let y = match x {
    |                   -
    |                   |
-   |                   this match expression has type `std::boxed::Box<T>`
+   |                   this expression has type `std::boxed::Box<T>`
    |                   help: consider dereferencing the boxed value: `*x`
 LL |         T::A(a) | T::B(a) => a,
    |                   ^^^^^^^ expected struct `std::boxed::Box`, found enum `T`
@@ -32,7 +32,7 @@ error[E0308]: mismatched types
 LL |     let y = match x {
    |                   -
    |                   |
-   |                   this match expression has type `std::boxed::Box<S>`
+   |                   this expression has type `std::boxed::Box<S>`
    |                   help: consider dereferencing the boxed value: `*x`
 LL |         S::A { a } | S::B { b: a } => a,
    |         ^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
@@ -46,7 +46,7 @@ error[E0308]: mismatched types
 LL |     let y = match x {
    |                   -
    |                   |
-   |                   this match expression has type `std::boxed::Box<S>`
+   |                   this expression has type `std::boxed::Box<S>`
    |                   help: consider dereferencing the boxed value: `*x`
 LL |         S::A { a } | S::B { b: a } => a,
    |                      ^^^^^^^^^^^^^ expected struct `std::boxed::Box`, found enum `S`
diff --git a/src/test/ui/issues/issue-7092.stderr b/src/test/ui/issues/issue-7092.stderr
index 05c00da16b1..590dd40c653 100644
--- a/src/test/ui/issues/issue-7092.stderr
+++ b/src/test/ui/issues/issue-7092.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-7092.rs:6:9
    |
 LL |     match x {
-   |           - this match expression has type `Whatever`
+   |           - this expression has type `Whatever`
 LL |         Some(field) =>
    |         ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option`
    |
diff --git a/src/test/ui/match/match-struct.stderr b/src/test/ui/match/match-struct.stderr
index c23451d51ec..a475bd5e581 100644
--- a/src/test/ui/match/match-struct.stderr
+++ b/src/test/ui/match/match-struct.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/match-struct.rs:6:9
    |
 LL |     match (S { a: 1 }) {
-   |           ------------ this match expression has type `S`
+   |           ------------ this expression has type `S`
 LL |         E::C(_) => (),
    |         ^^^^^^^ expected struct `S`, found enum `E`
 
diff --git a/src/test/ui/match/match-tag-unary.stderr b/src/test/ui/match/match-tag-unary.stderr
index db5dcd2be3b..31f77bdff8b 100644
--- a/src/test/ui/match/match-tag-unary.stderr
+++ b/src/test/ui/match/match-tag-unary.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } }
    |                                       -   ^^^^^^^ expected enum `A`, found enum `B`
    |                                       |
-   |                                       this match expression has type `A`
+   |                                       this expression has type `A`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/parser/pat-tuple-5.stderr b/src/test/ui/parser/pat-tuple-5.stderr
index 5b0253cd273..8ff4f948a05 100644
--- a/src/test/ui/parser/pat-tuple-5.stderr
+++ b/src/test/ui/parser/pat-tuple-5.stderr
@@ -17,7 +17,7 @@ error[E0308]: mismatched types
   --> $DIR/pat-tuple-5.rs:5:10
    |
 LL |     match (0, 1) {
-   |           ------ this match expression has type `({integer}, {integer})`
+   |           ------ this expression has type `({integer}, {integer})`
 LL |         (PAT ..) => {}
    |          ^^^ expected tuple, found `u8`
    |
diff --git a/src/test/ui/pattern/pattern-error-continue.stderr b/src/test/ui/pattern/pattern-error-continue.stderr
index 2f9fe1981bc..60f76796c03 100644
--- a/src/test/ui/pattern/pattern-error-continue.stderr
+++ b/src/test/ui/pattern/pattern-error-continue.stderr
@@ -28,7 +28,7 @@ error[E0308]: mismatched types
   --> $DIR/pattern-error-continue.rs:22:9
    |
 LL |     match 'c' {
-   |           --- this match expression has type `char`
+   |           --- this expression has type `char`
 LL |         S { .. } => (),
    |         ^^^^^^^^ expected `char`, found struct `S`
 
diff --git a/src/test/ui/pattern/pattern-tyvar.stderr b/src/test/ui/pattern/pattern-tyvar.stderr
index b2afeacdf68..1e671e8d8ef 100644
--- a/src/test/ui/pattern/pattern-tyvar.stderr
+++ b/src/test/ui/pattern/pattern-tyvar.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/pattern-tyvar.rs:5:18
    |
 LL |     match t {
-   |           - this match expression has type `std::option::Option<std::vec::Vec<isize>>`
+   |           - this expression has type `std::option::Option<std::vec::Vec<isize>>`
 LL |       Bar::T1(_, Some::<isize>(x)) => {
    |                  ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found `isize`
    |
diff --git a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
index 1143bddfe45..a69011d7450 100644
--- a/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
+++ b/src/test/ui/rfc-2497-if-let-chains/disallowed-positions.stderr
@@ -630,7 +630,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:67:12
    |
 LL |     if let Range { start: _, end: _ } = true..true && false {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
    |            |
    |            expected `bool`, found struct `std::ops::Range`
    |
@@ -650,7 +650,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:71:12
    |
 LL |     if let Range { start: _, end: _ } = true..true || false {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
    |            |
    |            expected `bool`, found struct `std::ops::Range`
    |
@@ -697,7 +697,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:86:12
    |
 LL |     if let Range { start: true, end } = t..&&false {}
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `bool`
    |            |
    |            expected `bool`, found struct `std::ops::Range`
    |
@@ -818,7 +818,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:131:15
    |
 LL |     while let Range { start: _, end: _ } = true..true && false {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
    |               |
    |               expected `bool`, found struct `std::ops::Range`
    |
@@ -838,7 +838,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:135:15
    |
 LL |     while let Range { start: _, end: _ } = true..true || false {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
    |               |
    |               expected `bool`, found struct `std::ops::Range`
    |
@@ -885,7 +885,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:150:15
    |
 LL |     while let Range { start: true, end } = t..&&false {}
-   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this match expression has type `bool`
+   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^   - this expression has type `bool`
    |               |
    |               expected `bool`, found struct `std::ops::Range`
    |
@@ -961,7 +961,7 @@ error[E0308]: mismatched types
   --> $DIR/disallowed-positions.rs:198:10
    |
 LL |     (let Range { start: _, end: _ } = true..true || false);
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this match expression has type `bool`
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^   ---- this expression has type `bool`
    |          |
    |          expected `bool`, found struct `std::ops::Range`
    |
diff --git a/src/test/ui/structs/structure-constructor-type-mismatch.stderr b/src/test/ui/structs/structure-constructor-type-mismatch.stderr
index 4bd3acac532..8cfa118a2da 100644
--- a/src/test/ui/structs/structure-constructor-type-mismatch.stderr
+++ b/src/test/ui/structs/structure-constructor-type-mismatch.stderr
@@ -86,7 +86,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:54:9
    |
 LL |     match (Point { x: 1, y: 2 }) {
-   |           ---------------------- this match expression has type `Point<{integer}>`
+   |           ---------------------- this expression has type `Point<{integer}>`
 LL |         PointF::<u32> { .. } => {}
    |         ^^^^^^^^^^^^^^^^^^^^ expected integer, found `f32`
    |
@@ -97,7 +97,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:59:9
    |
 LL |     match (Point { x: 1, y: 2 }) {
-   |           ---------------------- this match expression has type `Point<{integer}>`
+   |           ---------------------- this expression has type `Point<{integer}>`
 LL |         PointF { .. } => {}
    |         ^^^^^^^^^^^^^ expected integer, found `f32`
    |
@@ -108,7 +108,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:67:9
    |
 LL |     match (Pair { x: 1, y: 2 }) {
-   |           --------------------- this match expression has type `Pair<{integer}, {integer}>`
+   |           --------------------- this expression has type `Pair<{integer}, {integer}>`
 LL |         PairF::<u32> { .. } => {}
    |         ^^^^^^^^^^^^^^^^^^^ expected integer, found `f32`
    |