about summary refs log tree commit diff
path: root/src/test/compile-fail/issue-5100.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/compile-fail/issue-5100.rs')
-rw-r--r--src/test/compile-fail/issue-5100.rs36
1 files changed, 30 insertions, 6 deletions
diff --git a/src/test/compile-fail/issue-5100.rs b/src/test/compile-fail/issue-5100.rs
index ca7f87ff61a..b051abbc7ff 100644
--- a/src/test/compile-fail/issue-5100.rs
+++ b/src/test/compile-fail/issue-5100.rs
@@ -15,28 +15,48 @@ enum A { B, C }
 fn main() {
     match (true, false) {
         A::B => (),
-//~^ ERROR mismatched types: expected `(bool, bool)`, found `A` (expected tuple, found enum A)
+//~^ ERROR mismatched types:
+//~| expected `(bool, bool)`
+//~| found `A`
+//~| expected tuple
+//~| found enum `A`
         _ => ()
     }
 
     match (true, false) {
         (true, false, false) => ()
-//~^ ERROR mismatched types: expected `(bool, bool)`, found `(_, _, _)`
+//~^ ERROR mismatched types
+//~| expected `(bool, bool)`
+//~| found `(_, _, _)`
+//~| expected a tuple with 2 elements
+//~| found one with 3 elements
     }
 
     match (true, false) {
         (true, false, false) => ()
-//~^ ERROR (expected a tuple with 2 elements, found one with 3 elements)
+//~^ ERROR mismatched types
+//~| expected `(bool, bool)`
+//~| found `(_, _, _)`
+//~| expected a tuple with 2 elements
+//~| found one with 3 elements
     }
 
     match (true, false) {
         box (true, false) => ()
-//~^ ERROR mismatched types: expected `(bool, bool)`, found `Box<_>` (expected tuple, found box)
+//~^ ERROR mismatched types
+//~| expected `(bool, bool)`
+//~| found `Box<_>`
+//~| expected tuple
+//~| found box
     }
 
     match (true, false) {
         &(true, false) => ()
-//~^ ERROR mismatched types: expected `(bool, bool)`, found `&_` (expected tuple, found &-ptr)
+//~^ ERROR mismatched types
+//~| expected `(bool, bool)`
+//~| found `&_`
+//~| expected tuple
+//~| found &-ptr
     }
 
 
@@ -47,5 +67,9 @@ fn main() {
     for &(x,y) in v.iter() {} // should be OK
 
     // Make sure none of the errors above were fatal
-    let x: char = true; //~ ERROR expected `char`, found `bool`
+    let x: char = true; //~  ERROR mismatched types
+                        //~| expected `char`
+                        //~| found `bool`
+                        //~| expected char
+                        //~| found bool
 }