Skip to content

Commit 72d965f

Browse files
committed
Reword label as per review comment
1 parent f9e10f1 commit 72d965f

21 files changed

+26
-26
lines changed

src/librustc/infer/error_reporting/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
488488
fn note_error_origin(&self, err: &mut DiagnosticBuilder<'tcx>, cause: &ObligationCause<'tcx>) {
489489
match cause.code {
490490
ObligationCauseCode::MatchExpressionArmPattern { span, ty } => {
491-
err.span_label(span, format!("this match expression evaluates to `{}`", ty));
491+
err.span_label(span, format!("this match expression has type `{}`", ty));
492492
}
493493
ObligationCauseCode::MatchExpressionArm { arm_span, source } => match source {
494494
hir::MatchSource::IfLetDesugar { .. } => {

src/test/ui/block-result/issue-13624.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
1313
--> $DIR/issue-13624.rs:22:9
1414
|
1515
LL | match enum_struct_variant {
16-
| ------------------- this match expression evaluates to `()`
16+
| ------------------- this match expression has type `()`
1717
LL | a::Enum::EnumStructVariant { x, y, z } => {
1818
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found enum `a::Enum`
1919
|

src/test/ui/error-codes/E0308-4.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/E0308-4.rs:4:9
33
|
44
LL | match x {
5-
| - this match expression evaluates to `u8`
5+
| - this match expression has type `u8`
66
LL | 0u8..=3i8 => (), //~ ERROR E0308
77
| ^^^^^^^^^ expected u8, found i8
88

src/test/ui/issues/issue-11844.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-11844.rs:6:9
33
|
44
LL | match a {
5-
| - this match expression evaluates to `std::option::Option<std::boxed::Box<{integer}>>`
5+
| - this match expression has type `std::option::Option<std::boxed::Box<{integer}>>`
66
LL | Ok(a) => //~ ERROR: mismatched types
77
| ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
88
|

src/test/ui/issues/issue-12552.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-12552.rs:6:5
33
|
44
LL | match t {
5-
| - this match expression evaluates to `std::result::Result<_, {integer}>`
5+
| - this match expression has type `std::result::Result<_, {integer}>`
66
LL | Some(k) => match k { //~ ERROR mismatched types
77
| ^^^^^^^ expected enum `std::result::Result`, found enum `std::option::Option`
88
|

src/test/ui/issues/issue-13466.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-13466.rs:8:9
33
|
44
LL | let _x: usize = match Some(1) {
5-
| ------- this match expression evaluates to `std::option::Option<{integer}>`
5+
| ------- this match expression has type `std::option::Option<{integer}>`
66
LL | Ok(u) => u,
77
| ^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
88
|
@@ -13,7 +13,7 @@ error[E0308]: mismatched types
1313
--> $DIR/issue-13466.rs:14:9
1414
|
1515
LL | let _x: usize = match Some(1) {
16-
| ------- this match expression evaluates to `std::option::Option<{integer}>`
16+
| ------- this match expression has type `std::option::Option<{integer}>`
1717
...
1818
LL | Err(e) => panic!(e)
1919
| ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`

src/test/ui/issues/issue-15896.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-15896.rs:11:11
33
|
44
LL | let u = match e {
5-
| - this match expression evaluates to `main::R`
5+
| - this match expression has type `main::R`
66
LL | E::B(
77
LL | Tau{t: x},
88
| ^^^^^^^^^ expected enum `main::R`, found struct `main::Tau`

src/test/ui/issues/issue-16401.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-16401.rs:8:9
33
|
44
LL | match () {
5-
| -- this match expression evaluates to `()`
5+
| -- this match expression has type `()`
66
LL | Slice { data: data, len: len } => (),
77
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected (), found struct `Slice`
88
|

src/test/ui/issues/issue-3680.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
22
--> $DIR/issue-3680.rs:3:9
33
|
44
LL | match None {
5-
| ---- this match expression evaluates to `std::option::Option<_>`
5+
| ---- this match expression has type `std::option::Option<_>`
66
LL | Err(_) => ()
77
| ^^^^^^ expected enum `std::option::Option`, found enum `std::result::Result`
88
|

src/test/ui/issues/issue-5100.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ error[E0308]: mismatched types
2929
--> $DIR/issue-5100.rs:33:9
3030
|
3131
LL | match (true, false) {
32-
| ------------- this match expression evaluates to `(bool, bool)`
32+
| ------------- this match expression has type `(bool, bool)`
3333
LL | box (true, false) => ()
3434
| ^^^^^^^^^^^^^^^^^ expected tuple, found struct `std::boxed::Box`
3535
|

0 commit comments

Comments
 (0)