about summary refs log tree commit diff
path: root/src/test/ui/match
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-11-14 23:45:30 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-11-18 11:03:03 -0800
commit94c642546497dd4c04609bd6dbe7631fb56df1fa (patch)
treedeb8c44a34db3e9e6cfd3e421e83c5d7317cacab /src/test/ui/match
parentb2e6aef0731990c98a6fb7ac6f890aa359a5e9e6 (diff)
downloadrust-94c642546497dd4c04609bd6dbe7631fb56df1fa.tar.gz
rust-94c642546497dd4c04609bd6dbe7631fb56df1fa.zip
Remove E0308 note when primary label has all info
Diffstat (limited to 'src/test/ui/match')
-rw-r--r--src/test/ui/match/match-arm-resolving-to-never.stderr4
-rw-r--r--src/test/ui/match/match-range-fail.rs2
-rw-r--r--src/test/ui/match/match-range-fail.stderr3
-rw-r--r--src/test/ui/match/match-struct.rs2
-rw-r--r--src/test/ui/match/match-struct.stderr3
-rw-r--r--src/test/ui/match/match-tag-nullary.stderr3
-rw-r--r--src/test/ui/match/match-tag-unary.stderr3
-rw-r--r--src/test/ui/match/match-type-err-first-arm.rs3
-rw-r--r--src/test/ui/match/match-type-err-first-arm.stderr18
9 files changed, 5 insertions, 36 deletions
diff --git a/src/test/ui/match/match-arm-resolving-to-never.stderr b/src/test/ui/match/match-arm-resolving-to-never.stderr
index f717cf4ea75..4598b512f1d 100644
--- a/src/test/ui/match/match-arm-resolving-to-never.stderr
+++ b/src/test/ui/match/match-arm-resolving-to-never.stderr
@@ -9,12 +9,10 @@ LL | |         E::D => 4,
 LL | |         E::E => unimplemented!(""),
    | |                 ------------------ this and all prior arms are found to be of type `{integer}`
 LL | |         E::F => "",
-   | |                 ^^ expected integer, found reference
+   | |                 ^^ expected integer, found &str
 LL | |     };
    | |_____- `match` arms have incompatible types
    |
-   = note:   expected type `{integer}`
-           found reference `&'static str`
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
diff --git a/src/test/ui/match/match-range-fail.rs b/src/test/ui/match/match-range-fail.rs
index 252d4cbf162..c0cdbe342a0 100644
--- a/src/test/ui/match/match-range-fail.rs
+++ b/src/test/ui/match/match-range-fail.rs
@@ -19,6 +19,4 @@ fn main() {
         _ => { }
     };
     //~^^^ ERROR mismatched types
-    //~| expected type `{integer}`
-    //~| found type `char`
 }
diff --git a/src/test/ui/match/match-range-fail.stderr b/src/test/ui/match/match-range-fail.stderr
index 25fa9c2f618..8ce2d8853de 100644
--- a/src/test/ui/match/match-range-fail.stderr
+++ b/src/test/ui/match/match-range-fail.stderr
@@ -29,9 +29,6 @@ error[E0308]: mismatched types
    |
 LL |         'c' ..= 100 => { }
    |         ^^^^^^^^^^^ expected integer, found char
-   |
-   = note: expected type `{integer}`
-              found type `char`
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/match/match-struct.rs b/src/test/ui/match/match-struct.rs
index e82d9581b2d..7a54c54b98c 100644
--- a/src/test/ui/match/match-struct.rs
+++ b/src/test/ui/match/match-struct.rs
@@ -6,8 +6,6 @@ fn main() {
         E::C(_) => (),
         //~^ ERROR mismatched types
         //~| expected struct `S`, found enum `E`
-        //~| expected struct `S`
-        //~| found enum `E`
         _ => ()
     }
 }
diff --git a/src/test/ui/match/match-struct.stderr b/src/test/ui/match/match-struct.stderr
index 3d4a19a9317..c23451d51ec 100644
--- a/src/test/ui/match/match-struct.stderr
+++ b/src/test/ui/match/match-struct.stderr
@@ -5,9 +5,6 @@ LL |     match (S { a: 1 }) {
    |           ------------ this match expression has type `S`
 LL |         E::C(_) => (),
    |         ^^^^^^^ expected struct `S`, found enum `E`
-   |
-   = note: expected struct `S`
-                found enum `E`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-tag-nullary.stderr b/src/test/ui/match/match-tag-nullary.stderr
index 5dd7b564d9d..4b6260b2199 100644
--- a/src/test/ui/match/match-tag-nullary.stderr
+++ b/src/test/ui/match/match-tag-nullary.stderr
@@ -3,9 +3,6 @@ error[E0308]: mismatched types
    |
 LL | fn main() { let x: A = A::A; match x { B::B => { } } }
    |                                        ^^^^ expected enum `A`, found enum `B`
-   |
-   = note: expected enum `A`
-              found enum `B`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-tag-unary.stderr b/src/test/ui/match/match-tag-unary.stderr
index 833d8838e57..db5dcd2be3b 100644
--- a/src/test/ui/match/match-tag-unary.stderr
+++ b/src/test/ui/match/match-tag-unary.stderr
@@ -5,9 +5,6 @@ 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`
-   |
-   = note: expected enum `A`
-              found enum `B`
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/match/match-type-err-first-arm.rs b/src/test/ui/match/match-type-err-first-arm.rs
index 8dfbf1019e9..2a0f01a0b09 100644
--- a/src/test/ui/match/match-type-err-first-arm.rs
+++ b/src/test/ui/match/match-type-err-first-arm.rs
@@ -18,7 +18,6 @@ fn test_func2(n: i32) -> i32 {
         _ => 42,
         //~^ ERROR match arms have incompatible types
         //~| NOTE expected char, found integer
-        //~| NOTE expected type `char`
     };
     x
 }
@@ -35,7 +34,6 @@ fn test_func3(n: i32) -> i32 {
         _ => 42,
         //~^ ERROR match arms have incompatible types
         //~| NOTE expected char, found integer
-        //~| NOTE expected type `char`
     };
     x
 }
@@ -48,6 +46,5 @@ fn test_func4() {
         None => {}
         //~^ ERROR match arms have incompatible types
         //~| NOTE expected u32, found ()
-        //~| NOTE expected type `u32`
     };
 }
diff --git a/src/test/ui/match/match-type-err-first-arm.stderr b/src/test/ui/match/match-type-err-first-arm.stderr
index 8f8bb4bdcd2..39048e03296 100644
--- a/src/test/ui/match/match-type-err-first-arm.stderr
+++ b/src/test/ui/match/match-type-err-first-arm.stderr
@@ -18,15 +18,11 @@ LL | |         _ => 42,
    | |              ^^ expected char, found integer
 LL | |
 LL | |
-LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `char`
-              found type `{integer}`
 
 error[E0308]: match arms have incompatible types
-  --> $DIR/match-type-err-first-arm.rs:35:14
+  --> $DIR/match-type-err-first-arm.rs:34:14
    |
 LL |       let x = match n {
    |  _____________-
@@ -39,16 +35,13 @@ LL | |         6 => 'b',
 LL | |
 LL | |         _ => 42,
    | |              ^^ expected char, found integer
-...  |
+LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note: expected type `char`
-              found type `{integer}`
 
 error[E0308]: match arms have incompatible types
-  --> $DIR/match-type-err-first-arm.rs:48:17
+  --> $DIR/match-type-err-first-arm.rs:46:17
    |
 LL | /     match Some(0u32) {
 LL | |         Some(x) => {
@@ -57,13 +50,10 @@ LL | |             x
 LL | |         },
 LL | |         None => {}
    | |                 ^^ expected u32, found ()
-...  |
+LL | |
 LL | |
 LL | |     };
    | |_____- `match` arms have incompatible types
-   |
-   = note:   expected type `u32`
-           found unit type `()`
 
 error: aborting due to 4 previous errors