]> git.lizzy.rs Git - rust.git/commitdiff
Reword label as per review comment
authorEsteban Küber <esteban@kuber.com.ar>
Sun, 6 Jan 2019 22:23:57 +0000 (14:23 -0800)
committerEsteban Küber <esteban@kuber.com.ar>
Sun, 13 Jan 2019 03:36:28 +0000 (19:36 -0800)
21 files changed:
src/librustc/infer/error_reporting/mod.rs
src/test/ui/block-result/issue-13624.stderr
src/test/ui/error-codes/E0308-4.stderr
src/test/ui/issues/issue-11844.stderr
src/test/ui/issues/issue-12552.stderr
src/test/ui/issues/issue-13466.stderr
src/test/ui/issues/issue-15896.stderr
src/test/ui/issues/issue-16401.stderr
src/test/ui/issues/issue-3680.stderr
src/test/ui/issues/issue-5100.stderr
src/test/ui/issues/issue-5358-1.stderr
src/test/ui/issues/issue-7092.stderr
src/test/ui/match/match-range-fail.stderr
src/test/ui/match/match-struct.stderr
src/test/ui/match/match-tag-unary.stderr
src/test/ui/mismatched_types/E0409.stderr
src/test/ui/or-pattern-mismatch.stderr
src/test/ui/pattern/pattern-error-continue.stderr
src/test/ui/pattern/pattern-tyvar.stderr
src/test/ui/resolve/resolve-inconsistent-binding-mode.stderr
src/test/ui/structs/structure-constructor-type-mismatch.stderr

index 0063e488b0da17950c62dc3a3894101e2d3c2cc0..eec92675af6811957923fbb9fc2d1d7f8bf28d91 100644 (file)
@@ -488,7 +488,7 @@ fn check_and_note_conflicting_crates(
     fn note_error_origin(&self, err: &mut DiagnosticBuilder<'tcx>, cause: &ObligationCause<'tcx>) {
         match cause.code {
             ObligationCauseCode::MatchExpressionArmPattern { span, ty } => {
-                err.span_label(span, format!("this match expression evaluates to `{}`", ty));
+                err.span_label(span, format!("this match expression has type `{}`", ty));
             }
             ObligationCauseCode::MatchExpressionArm { arm_span, source } => match source {
                 hir::MatchSource::IfLetDesugar { .. } => {
index 545d4916cf7a53754fd2580bf289a06d340a33b2..417667a5354fd723d445c5e9271bb60ccf7d59e1 100644 (file)
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13624.rs:22:9
    |
 LL |       match enum_struct_variant {
-   |             ------------------- this match expression evaluates to `()`
+   |             ------------------- this match expression has type `()`
 LL |         a::Enum::EnumStructVariant { x, y, z } => {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
    |
index 7971f1d9eda447417e850ce4d683e33c1c43826a..f69a389336590817614194480b0a7f037ada8ca2 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/E0308-4.rs:4:9
    |
 LL |     match x {
-   |           - this match expression evaluates to `u8`
+   |           - this match expression has type `u8`
 LL |         0u8..=3i8 => (), //~ ERROR E0308
    |         ^^^^^^^^^ expected u8, found i8
 
index 4459b64aa8f06eb65e9404deb345b897483c7ce2..683ad48ff52c0b4249eefe376f2474f353961678 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-11844.rs:6:9
    |
 LL |     match a {
-   |           - this match expression evaluates to `std::option::Option<std::boxed::Box<{integer}>>`
+   |           - this match expression has type `std::option::Option<std::boxed::Box<{integer}>>`
 LL |         Ok(a) => //~ ERROR: mismatched types
    |         ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
index b299b3fb3e832cac52b08e0acbde299571b304bf..768d11bf899a1f333f33f22c15aeb0c8769305aa 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-12552.rs:6:5
    |
 LL |   match t {
-   |         - this match expression evaluates to `std::result::Result<_, {integer}>`
+   |         - this match expression has type `std::result::Result<_, {integer}>`
 LL |     Some(k) => match k { //~ ERROR mismatched types
    |     ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
    |
index 8ba5114d143b099fe8f0a326920a29514989ae5b..66255891f469a01534d355464546a796ca3c14f1 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13466.rs:8:9
    |
 LL |     let _x: usize = match Some(1) {
-   |                           ------- this match expression evaluates to `std::option::Option<{integer}>`
+   |                           ------- this match 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 evaluates to `std::option::Option<{integer}>`
+   |                           ------- this match expression has type `std::option::Option<{integer}>`
 ...
 LL |         Err(e) => panic!(e)
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
index b88bfea7e85b564b12de31ded0def02f91f09070..de9757d5d32ed912e4cc322177d84d0b9b74e658 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-15896.rs:11:11
    |
 LL |     let u = match e {
-   |                   - this match expression evaluates to `main::R`
+   |                   - this match expression has type `main::R`
 LL |         E::B(
 LL |           Tau{t: x},
    |           ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau`
index ea5f89d18ddb2648cc8d8ebdd2846c259e5930f7..1779d0befd871faab0eb4d6751dcb64ce5fa8d9f 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-16401.rs:8:9
    |
 LL |     match () {
-   |           -- this match expression evaluates to `()`
+   |           -- this match expression has type `()`
 LL |         Slice { data: data, len: len } => (),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
    |
index 82b6462d3b4b06422a03182a69c013dc02c0b342..51903cfadab15e4ee9096679d32a83cb3a1a4634 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-3680.rs:3:9
    |
 LL |     match None {
-   |           ---- this match expression evaluates to `std::option::Option<_>`
+   |           ---- this match expression has type `std::option::Option<_>`
 LL |         Err(_) => ()
    |         ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
    |
index d3072143c1555b6d2c67c321e44b285e00e6497d..0a918a789703e5f0e66725373b2e78026dfe3575 100644 (file)
@@ -29,7 +29,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-5100.rs:33:9
    |
 LL |     match (true, false) {
-   |           ------------- this match expression evaluates to `(bool, bool)`
+   |           ------------- this match expression has type `(bool, bool)`
 LL |         box (true, false) => ()
    |         ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box`
    |
index bdd70ebac94b83d8c19bad01054d7d507a14d8e1..649a0c1581a687e0069b1e2504d13e5d7722d46c 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-5358-1.rs:6:9
    |
 LL |     match S(Either::Left(5)) {
-   |           ------------------ this match expression evaluates to `S`
+   |           ------------------ this match expression has type `S`
 LL |         Either::Right(_) => {}
    |         ^^^^^^^^^^^^^^^^ expected struct `S`, found enum `Either`
    |
index 61564f9004eb57681aa7a5932cfee17b825d2067..7bb682028748706ea5aa1c406e11c5de8035d7b6 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-7092.rs:6:9
    |
 LL |     match x {
-   |           - this match expression evaluates to `Whatever`
+   |           - this match expression has type `Whatever`
 LL |         Some(field) =>
    |         ^^^^^^^^^^^ expected enum `Whatever`, found enum `std::option::Option`
    |
index db7afc36bd7b09d051e6faedc5eff0dae7959f91..532f5e23ff5e90f6b66bc4bd0961b3881b0d1cd2 100644 (file)
@@ -20,7 +20,7 @@ error[E0308]: mismatched types
   --> $DIR/match-range-fail.rs:17:9
    |
 LL |     match 5 {
-   |           - this match expression evaluates to `{integer}`
+   |           - this match expression has type `{integer}`
 LL |         'c' ..= 100 => { }
    |         ^^^^^^^^^^^ expected integer, found char
    |
index 8e9d09288b1dbee85a3ab743d7fe5ebeff4f24e2..2a24a293e98364e68c6a3a4c47fbecac7ace3e05 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/match-struct.rs:6:9
    |
 LL |     match (S { a: 1 }) {
-   |           ------------ this match expression evaluates to `S`
+   |           ------------ this match expression has type `S`
 LL |         E::C(_) => (),
    |         ^^^^^^^ expected struct `S`, found enum `E`
    |
index f5e7051a9e8207652cb1ecdd95b86025bab28243..53b663513696626d0b3a3a09eafb8fa17dc5bd9f 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn main() { let x: A = A::A(0); match x { B::B(y) => { } } } //~ ERROR mismatched types
    |                                       -   ^^^^^^^ expected enum `A`, found enum `B`
    |                                       |
-   |                                       this match expression evaluates to `A`
+   |                                       this match expression has type `A`
    |
    = note: expected type `A`
               found type `B`
index 4df2984a6dcc6ad02ec6e8c0280e4eb86e0b3149..a73f9ab4dfddaa787be86ef8d324fb843bb9e6c2 100644 (file)
@@ -10,7 +10,7 @@ error[E0308]: mismatched types
   --> $DIR/E0409.rs:5:23
    |
 LL |     match x {
-   |           - this match expression evaluates to `_`
+   |           - this match expression has type `_`
 LL |         (0, ref y) | (y, 0) => {} //~ ERROR E0409
    |                       ^ expected &{integer}, found integer
    |
index 49f68c7f0682a9e03f77e892a67bffd51fe0997d..c3a203cf3ab6e65b95cc68a9f06b9ce1a0633de0 100644 (file)
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn main() { match Blah::A(1, 1, 2) { Blah::A(_, x, y) | Blah::B(x, y) => { } } }
    |                   ----------------                                 ^ expected usize, found isize
    |                   |
-   |                   this match expression evaluates to `_`
+   |                   this match expression has type `_`
    |
    = note: expected type `usize`
               found type `isize`
index 318067cbb50bfc6baaf5a144ccbd8aa74f7d14f7..c2810d764c2ceba3d2247485e1f357aa962d755b 100644 (file)
@@ -22,7 +22,7 @@ error[E0308]: mismatched types
   --> $DIR/pattern-error-continue.rs:22:9
    |
 LL |     match 'c' {
-   |           --- this match expression evaluates to `char`
+   |           --- this match expression has type `char`
 LL |         S { .. } => (),
    |         ^^^^^^^^ expected char, found struct `S`
    |
index cb9058a30da437da01095e767664c7c676d62740..69cd552aabd1bf56c29f311977558064e6daa56a 100644 (file)
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/pattern-tyvar.rs:5:18
    |
 LL |     match t {
-   |           - this match expression evaluates to `std::option::Option<std::vec::Vec<isize>>`
+   |           - this match expression has type `std::option::Option<std::vec::Vec<isize>>`
 LL |       Bar::T1(_, Some::<isize>(x)) => { //~ ERROR mismatched types
    |                  ^^^^^^^^^^^^^^^^ expected struct `std::vec::Vec`, found isize
    |
index 69b151c733bf314c156c9ff9f018933cd63db9c3..148f084e401ac7dd5bdfb7c62f6f13b818ea12c8 100644 (file)
@@ -24,7 +24,7 @@ error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:7:32
    |
 LL |     match x {
-   |           - this match expression evaluates to `_`
+   |           - this match expression has type `_`
 LL |       Opts::A(ref i) | Opts::B(i) => {}
    |                                ^ expected &isize, found isize
    |
@@ -35,7 +35,7 @@ error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:16:32
    |
 LL |     match x {
-   |           - this match expression evaluates to `_`
+   |           - this match expression has type `_`
 LL |       Opts::A(ref i) | Opts::B(i) => {}
    |                                ^ expected &isize, found isize
    |
@@ -46,7 +46,7 @@ error[E0308]: mismatched types
   --> $DIR/resolve-inconsistent-binding-mode.rs:25:36
    |
 LL |     match x {
-   |           - this match expression evaluates to `_`
+   |           - this match expression has type `_`
 LL |       Opts::A(ref mut i) | Opts::B(ref i) => {}
    |                                    ^^^^^ types differ in mutability
    |
index 564e3551065dfc8ecdb7f40f48005c7bc04e8fc2..cc62316bec1851c82be12ddd0c97d37f075e199b 100644 (file)
@@ -110,7 +110,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:54:9
    |
 LL |     match (Point { x: 1, y: 2 }) {
-   |           ---------------------- this match expression evaluates to `Point<{integer}>`
+   |           ---------------------- this match expression has type `Point<{integer}>`
 LL |         PointF::<u32> { .. } => {} //~ ERROR wrong number of type arguments
    |         ^^^^^^^^^^^^^^^^^^^^ expected integer, found f32
    |
@@ -121,7 +121,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:59:9
    |
 LL |     match (Point { x: 1, y: 2 }) {
-   |           ---------------------- this match expression evaluates to `Point<{integer}>`
+   |           ---------------------- this match expression has type `Point<{integer}>`
 LL |         PointF { .. } => {} //~ ERROR mismatched types
    |         ^^^^^^^^^^^^^ expected integer, found f32
    |
@@ -132,7 +132,7 @@ error[E0308]: mismatched types
   --> $DIR/structure-constructor-type-mismatch.rs:67:9
    |
 LL |     match (Pair { x: 1, y: 2 }) {
-   |           --------------------- this match expression evaluates to `Pair<{integer}, {integer}>`
+   |           --------------------- this match expression has type `Pair<{integer}, {integer}>`
 LL |         PairF::<u32> { .. } => {} //~ ERROR mismatched types
    |         ^^^^^^^^^^^^^^^^^^^ expected integer, found f32
    |