about summary refs log tree commit diff
diff options
context:
space:
mode:
authormdinger <mdinger.bugzilla@gmail.com>2015-01-12 01:01:44 -0500
committermdinger <mdinger.bugzilla@gmail.com>2015-01-12 01:34:13 -0500
commit7b82a93be3798d9345cd459e251bcc571cf60a79 (patch)
tree0308a3af571fbcd3f0b3b17232e76e5628985ddf
parent5616b92e4d56dff3353d3e5f3ca6b16cb7ad60e6 (diff)
downloadrust-7b82a93be3798d9345cd459e251bcc571cf60a79.tar.gz
rust-7b82a93be3798d9345cd459e251bcc571cf60a79.zip
Fix testsuite errors
-rw-r--r--src/test/compile-fail/array-not-vector.rs14
-rw-r--r--src/test/compile-fail/associated-types-eq-3.rs17
-rw-r--r--src/test/compile-fail/associated-types-path-2.rs10
-rw-r--r--src/test/compile-fail/bad-const-type.rs7
-rw-r--r--src/test/compile-fail/block-must-not-have-result-do.rs8
-rw-r--r--src/test/compile-fail/block-must-not-have-result-res.rs8
-rw-r--r--src/test/compile-fail/block-must-not-have-result-while.rs8
-rw-r--r--src/test/compile-fail/coercion-slice.rs7
-rw-r--r--src/test/compile-fail/const-cast-different-types.rs12
-rw-r--r--src/test/compile-fail/cross-borrow-trait.rs6
-rw-r--r--src/test/compile-fail/destructure-trait-ref.rs21
-rw-r--r--src/test/compile-fail/dst-bad-assign.rs9
-rw-r--r--src/test/compile-fail/dst-bad-coerce1.rs6
-rw-r--r--src/test/compile-fail/dst-bad-coerce4.rs6
-rw-r--r--src/test/compile-fail/explicit-self-lifetime-mismatch.rs10
-rw-r--r--src/test/compile-fail/fn-item-type.rs12
-rw-r--r--src/test/compile-fail/fn-trait-formatting.rs21
-rw-r--r--src/test/compile-fail/fully-qualified-type-name1.rs6
-rw-r--r--src/test/compile-fail/fully-qualified-type-name2.rs6
-rw-r--r--src/test/compile-fail/fully-qualified-type-name4.rs6
-rw-r--r--src/test/compile-fail/generic-type-params-name-repr.rs36
-rw-r--r--src/test/compile-fail/if-branch-types.rs6
-rw-r--r--src/test/compile-fail/if-without-else-result.rs6
-rw-r--r--src/test/compile-fail/integer-literal-suffix-inference.rs252
-rw-r--r--src/test/compile-fail/integral-variable-unification-error.rs6
-rw-r--r--src/test/compile-fail/issue-10176.rs6
-rw-r--r--src/test/compile-fail/issue-11319.rs6
-rw-r--r--src/test/compile-fail/issue-11771.rs12
-rw-r--r--src/test/compile-fail/issue-12997-2.rs6
-rw-r--r--src/test/compile-fail/issue-13058.rs6
-rw-r--r--src/test/compile-fail/issue-13359.rs12
-rw-r--r--src/test/compile-fail/issue-13466.rs15
-rw-r--r--src/test/compile-fail/issue-13482-2.rs7
-rw-r--r--src/test/compile-fail/issue-13482.rs6
-rw-r--r--src/test/compile-fail/issue-13624.rs13
-rw-r--r--src/test/compile-fail/issue-14091.rs6
-rw-r--r--src/test/compile-fail/issue-14541.rs7
-rw-r--r--src/test/compile-fail/issue-14845.rs12
-rw-r--r--src/test/compile-fail/issue-15783.rs6
-rw-r--r--src/test/compile-fail/issue-15896.rs7
-rw-r--r--src/test/compile-fail/issue-16338.rs7
-rw-r--r--src/test/compile-fail/issue-16401.rs7
-rw-r--r--src/test/compile-fail/issue-17033.rs6
-rw-r--r--src/test/compile-fail/issue-17283.rs18
-rw-r--r--src/test/compile-fail/issue-17740.rs10
-rw-r--r--src/test/compile-fail/issue-17905.rs5
-rw-r--r--src/test/compile-fail/issue-19991.rs6
-rw-r--r--src/test/compile-fail/issue-2951.rs7
-rw-r--r--src/test/compile-fail/issue-3477.rs7
-rw-r--r--src/test/compile-fail/issue-3563.rs9
-rw-r--r--src/test/compile-fail/issue-3680.rs7
-rw-r--r--src/test/compile-fail/issue-4201.rs6
-rw-r--r--src/test/compile-fail/issue-4517.rs7
-rw-r--r--src/test/compile-fail/issue-4968.rs7
-rw-r--r--src/test/compile-fail/issue-5100.rs36
-rw-r--r--src/test/compile-fail/issue-5358-1.rs7
-rw-r--r--src/test/compile-fail/issue-5500.rs6
-rw-r--r--src/test/compile-fail/issue-7061.rs6
-rw-r--r--src/test/compile-fail/issue-7092.rs6
-rw-r--r--src/test/compile-fail/issue-7867.rs23
-rw-r--r--src/test/compile-fail/issue-8761.rs12
-rw-r--r--src/test/compile-fail/match-struct.rs7
-rw-r--r--src/test/compile-fail/match-vec-mismatch-2.rs6
-rw-r--r--src/test/compile-fail/method-self-arg-1.rs18
-rw-r--r--src/test/compile-fail/mut-pattern-mismatched.rs10
-rw-r--r--src/test/compile-fail/noexporttypeexe.rs6
-rw-r--r--src/test/compile-fail/occurs-check-2.rs6
-rw-r--r--src/test/compile-fail/occurs-check.rs6
-rw-r--r--src/test/compile-fail/pattern-error-continue.rs13
-rw-r--r--src/test/compile-fail/pptypedef.rs12
-rw-r--r--src/test/compile-fail/ptr-coercion.rs15
-rw-r--r--src/test/compile-fail/regions-bounds.rs10
-rw-r--r--src/test/compile-fail/regions-early-bound-error-method.rs8
-rw-r--r--src/test/compile-fail/regions-early-bound-error.rs8
-rw-r--r--src/test/compile-fail/regions-fn-subtyping-return-static.rs7
-rw-r--r--src/test/compile-fail/regions-infer-paramd-indirect.rs5
-rw-r--r--src/test/compile-fail/repeat_count.rs35
-rw-r--r--src/test/compile-fail/shift-various-bad-types.rs6
-rw-r--r--src/test/compile-fail/slightly-nice-generic-literal-messages.rs6
-rw-r--r--src/test/compile-fail/struct-base-wrong-type.rs24
-rw-r--r--src/test/compile-fail/structure-constructor-type-mismatch.rs16
-rw-r--r--src/test/compile-fail/suppressed-error.rs6
-rw-r--r--src/test/compile-fail/tag-that-dare-not-speak-its-name.rs6
-rw-r--r--src/test/compile-fail/terr-in-field.rs6
-rw-r--r--src/test/compile-fail/terr-sorts.rs6
-rw-r--r--src/test/compile-fail/trait-bounds-cant-coerce.rs6
-rw-r--r--src/test/compile-fail/tuple-arity-mismatch.rs12
-rw-r--r--src/test/compile-fail/tutorial-suffix-inference-test.rs18
-rw-r--r--src/test/compile-fail/type-mismatch-multiple.rs12
-rw-r--r--src/test/compile-fail/type-parameter-names.rs6
-rw-r--r--src/test/compile-fail/type-params-in-different-spaces-1.rs6
-rw-r--r--src/test/compile-fail/typeck_type_placeholder_mismatch.rs12
-rw-r--r--src/test/compile-fail/ufcs-explicit-self-bad.rs11
-rw-r--r--src/test/compile-fail/variadic-ffi.rs16
-rw-r--r--src/test/compile-fail/wrong-mul-method-signature.rs16
95 files changed, 980 insertions, 221 deletions
diff --git a/src/test/compile-fail/array-not-vector.rs b/src/test/compile-fail/array-not-vector.rs
index 6581019fdd5..2415288a3eb 100644
--- a/src/test/compile-fail/array-not-vector.rs
+++ b/src/test/compile-fail/array-not-vector.rs
@@ -9,8 +9,18 @@
 // except according to those terms.
 
 fn main() {
-    let _x: isize = [1is, 2, 3]; //~ ERROR expected isize, found array of 3 elements
+    let _x: isize = [1is, 2, 3];
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `[isize; 3]`
+    //~| expected isize
+    //~| found array of 3 elements
 
     let x: &[isize] = &[1, 2, 3];
-    let _y: &isize = x; //~ ERROR expected isize, found slice
+    let _y: &isize = x;
+    //~^ ERROR mismatched types
+    //~| expected `&isize`
+    //~| found `&[isize]`
+    //~| expected isize
+    //~| found slice
 }
diff --git a/src/test/compile-fail/associated-types-eq-3.rs b/src/test/compile-fail/associated-types-eq-3.rs
index ed81c0fccbc..fdfff559086 100644
--- a/src/test/compile-fail/associated-types-eq-3.rs
+++ b/src/test/compile-fail/associated-types-eq-3.rs
@@ -30,7 +30,12 @@ fn foo1<I: Foo<A=Bar>>(x: I) {
 }
 
 fn foo2<I: Foo>(x: I) {
-    let _: Bar = x.boo(); //~ERROR mismatched types
+    let _: Bar = x.boo();
+    //~^ ERROR mismatched types
+    //~| expected `Bar`
+    //~| found `<I as Foo>::A`
+    //~| expected struct `Bar`
+    //~| found associated type
 }
 
 
@@ -41,6 +46,12 @@ pub fn baz(x: &Foo<A=Bar>) {
 
 pub fn main() {
     let a = 42is;
-    foo1(a); //~ERROR expected usize, found struct Bar
-    baz(&a); //~ERROR expected usize, found struct Bar
+    foo1(a);
+    //~^ ERROR type mismatch resolving
+    //~| expected usize
+    //~| found struct `Bar`
+    baz(&a);
+    //~^ ERROR type mismatch resolving
+    //~| expected usize
+    //~| found struct `Bar`
 }
diff --git a/src/test/compile-fail/associated-types-path-2.rs b/src/test/compile-fail/associated-types-path-2.rs
index 74c8dffced5..5cb9aca8beb 100644
--- a/src/test/compile-fail/associated-types-path-2.rs
+++ b/src/test/compile-fail/associated-types-path-2.rs
@@ -25,7 +25,9 @@ pub fn f2<T: Foo>(a: T) -> T::A {
 
 pub fn f1_int_int() {
     f1(2is, 4is);
-    //~^ ERROR expected usize, found isize
+    //~^ ERROR type mismatch resolving
+    //~| expected usize
+    //~| found isize
 }
 
 pub fn f1_int_uint() {
@@ -46,7 +48,11 @@ pub fn f1_uint_int() {
 
 pub fn f2_int() {
     let _: isize = f2(2is);
-    //~^ ERROR expected `isize`, found `usize`
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `usize`
+    //~| expected isize
+    //~| found usize
 }
 
 pub fn main() { }
diff --git a/src/test/compile-fail/bad-const-type.rs b/src/test/compile-fail/bad-const-type.rs
index 2450f22669a..ed62506420a 100644
--- a/src/test/compile-fail/bad-const-type.rs
+++ b/src/test/compile-fail/bad-const-type.rs
@@ -8,7 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:expected `collections::string::String`, found `isize`
-
 static i: String = 10is;
+//~^ ERROR mismatched types
+//~| expected `collections::string::String`
+//~| found `isize`
+//~| expected struct `collections::string::String`
+//~| found isize
 fn main() { println!("{}", i); }
diff --git a/src/test/compile-fail/block-must-not-have-result-do.rs b/src/test/compile-fail/block-must-not-have-result-do.rs
index 687171f8c1f..30039a1c54c 100644
--- a/src/test/compile-fail/block-must-not-have-result-do.rs
+++ b/src/test/compile-fail/block-must-not-have-result-do.rs
@@ -8,10 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()`, found `bool`
-
 fn main() {
     loop {
-        true
+        true //~  ERROR mismatched types
+             //~| expected ()
+             //~| found bool
+             //~| expected ()
+             //~| found bool
     }
 }
diff --git a/src/test/compile-fail/block-must-not-have-result-res.rs b/src/test/compile-fail/block-must-not-have-result-res.rs
index 328c032325e..6161660ddf7 100644
--- a/src/test/compile-fail/block-must-not-have-result-res.rs
+++ b/src/test/compile-fail/block-must-not-have-result-res.rs
@@ -8,13 +8,15 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()`, found `bool`
-
 struct r;
 
 impl Drop for r {
     fn drop(&mut self) {
-        true
+        true //~  ERROR mismatched types
+             //~| expected ()
+             //~| found bool
+             //~| expected ()
+             //~| found bool
     }
 }
 
diff --git a/src/test/compile-fail/block-must-not-have-result-while.rs b/src/test/compile-fail/block-must-not-have-result-while.rs
index ed903f3fd65..ba6340ed395 100644
--- a/src/test/compile-fail/block-must-not-have-result-while.rs
+++ b/src/test/compile-fail/block-must-not-have-result-while.rs
@@ -8,10 +8,12 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `()`, found `bool`
-
 fn main() {
     while true {
-        true
+        true //~  ERROR mismatched types
+             //~| expected `()`
+             //~| found `bool`
+             //~| expected ()
+             //~| found bool
     }
 }
diff --git a/src/test/compile-fail/coercion-slice.rs b/src/test/compile-fail/coercion-slice.rs
index 8d48ede0e15..d7a37d26991 100644
--- a/src/test/compile-fail/coercion-slice.rs
+++ b/src/test/compile-fail/coercion-slice.rs
@@ -11,5 +11,10 @@
 // Tests that we forbid coercion from `[T; n]` to `&[T]`
 
 fn main() {
-    let _: &[isize] = [0is]; //~ERROR: mismatched types: expected `&[isize]`, found `[isize; 1]`
+    let _: &[isize] = [0is];
+    //~^ ERROR mismatched types
+    //~| expected `&[isize]`
+    //~| found `[isize; 1]`
+    //~| expected &-ptr
+    //~| found array of 1 elements
 }
diff --git a/src/test/compile-fail/const-cast-different-types.rs b/src/test/compile-fail/const-cast-different-types.rs
index 6b8e126db77..6e3732908ac 100644
--- a/src/test/compile-fail/const-cast-different-types.rs
+++ b/src/test/compile-fail/const-cast-different-types.rs
@@ -10,9 +10,17 @@
 
 static a: &'static str = "foo";
 static b: *const u8 = a as *const u8;
-//~^ ERROR mismatched types: expected `*const u8`, found `&'static str`
+//~^ ERROR mismatched types
+//~| expected *const u8
+//~| found &'static str
+//~| expected u8
+//~| found str
 static c: *const u8 = &a as *const u8;
-//~^ ERROR mismatched types: expected `*const u8`, found `&&'static str`
+//~^ ERROR mismatched types
+//~| expected *const u8
+//~| found &&'static str
+//~| expected u8
+//~| found &-ptr
 
 fn main() {
 }
diff --git a/src/test/compile-fail/cross-borrow-trait.rs b/src/test/compile-fail/cross-borrow-trait.rs
index ff96ea93184..86b7a8c8918 100644
--- a/src/test/compile-fail/cross-borrow-trait.rs
+++ b/src/test/compile-fail/cross-borrow-trait.rs
@@ -19,6 +19,10 @@ impl Trait for Foo {}
 
 pub fn main() {
     let x: Box<Trait> = box Foo;
-    let _y: &Trait = x; //~ ERROR mismatched types: expected `&Trait`, found `Box<Trait>`
+    let _y: &Trait = x; //~  ERROR mismatched types
+                        //~| expected `&Trait`
+                        //~| found `Box<Trait>`
+                        //~| expected &-ptr
+                        //~| found box
 }
 
diff --git a/src/test/compile-fail/destructure-trait-ref.rs b/src/test/compile-fail/destructure-trait-ref.rs
index 5166ef8f72f..5cc0d6a143a 100644
--- a/src/test/compile-fail/destructure-trait-ref.rs
+++ b/src/test/compile-fail/destructure-trait-ref.rs
@@ -37,7 +37,22 @@ fn main() {
     let box x = box 1is as Box<T>; //~ ERROR type `Box<T>` cannot be dereferenced
 
     // n > m
-    let &&x = &1is as &T;     //~ ERROR found &-ptr
-    let &&&x = &(&1is as &T); //~ ERROR found &-ptr
-    let box box x = box 1is as Box<T>;    //~ ERROR found box
+    let &&x = &1is as &T;
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `&_`
+    //~| expected trait T
+    //~| found &-ptr
+    let &&&x = &(&1is as &T);
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `&_`
+    //~| expected trait T
+    //~| found &-ptr
+    let box box x = box 1is as Box<T>;
+    //~^ ERROR mismatched types
+    //~| expected `T`
+    //~| found `Box<_>`
+    //~| expected trait T
+    //~| found box
 }
diff --git a/src/test/compile-fail/dst-bad-assign.rs b/src/test/compile-fail/dst-bad-assign.rs
index 634b5999e9e..152864b601c 100644
--- a/src/test/compile-fail/dst-bad-assign.rs
+++ b/src/test/compile-fail/dst-bad-assign.rs
@@ -44,6 +44,11 @@ pub fn main() {
     // Assignment.
     let f5: &mut Fat<ToBar> = &mut Fat { f1: 5, f2: "some str", ptr: Bar1 {f :42} };
     let z: Box<ToBar> = box Bar1 {f: 36};
-    f5.ptr = Bar1 {f: 36}; //~ ERROR mismatched types: expected `ToBar`, found `Bar1`
-    //~^ ERROR the trait `core::marker::Sized` is not implemented for the type `ToBar`
+    f5.ptr = Bar1 {f: 36};
+    //~^ ERROR mismatched types
+    //~| expected `ToBar`
+    //~| found `Bar1`
+    //~| expected trait ToBar
+    //~| found struct `Bar1`
+    //~| ERROR the trait `core::marker::Sized` is not implemented for the type `ToBar`
 }
diff --git a/src/test/compile-fail/dst-bad-coerce1.rs b/src/test/compile-fail/dst-bad-coerce1.rs
index e70db87a39a..2b96c5ebe12 100644
--- a/src/test/compile-fail/dst-bad-coerce1.rs
+++ b/src/test/compile-fail/dst-bad-coerce1.rs
@@ -22,7 +22,11 @@ pub fn main() {
     let f1 = Fat { ptr: [1, 2, 3] };
     let f2: &Fat<[isize; 3]> = &f1;
     let f3: &Fat<[usize]> = f2;
-    //~^ ERROR mismatched types: expected `&Fat<[usize]>`, found `&Fat<[isize; 3]>`
+    //~^ ERROR mismatched types
+    //~| expected `&Fat<[usize]>`
+    //~| found `&Fat<[isize; 3]>`
+    //~| expected usize
+    //~| found isize
 
     // With a trait.
     let f1 = Fat { ptr: Foo };
diff --git a/src/test/compile-fail/dst-bad-coerce4.rs b/src/test/compile-fail/dst-bad-coerce4.rs
index 8e81eacae92..c1443bdbb30 100644
--- a/src/test/compile-fail/dst-bad-coerce4.rs
+++ b/src/test/compile-fail/dst-bad-coerce4.rs
@@ -18,5 +18,9 @@ pub fn main() {
     // With a vec of isizes.
     let f1: &Fat<[isize]> = &Fat { ptr: [1, 2, 3] };
     let f2: &Fat<[isize; 3]> = f1;
-    //~^ ERROR mismatched types: expected `&Fat<[isize; 3]>`, found `&Fat<[isize]>`
+    //~^ ERROR mismatched types
+    //~| expected `&Fat<[isize; 3]>`
+    //~| found `&Fat<[isize]>`
+    //~| expected array of 3 elements
+    //~| found slice
 }
diff --git a/src/test/compile-fail/explicit-self-lifetime-mismatch.rs b/src/test/compile-fail/explicit-self-lifetime-mismatch.rs
index fbc5263d82d..92542ab3bcb 100644
--- a/src/test/compile-fail/explicit-self-lifetime-mismatch.rs
+++ b/src/test/compile-fail/explicit-self-lifetime-mismatch.rs
@@ -15,8 +15,14 @@ struct Foo<'a,'b> {
 
 impl<'a,'b> Foo<'a,'b> {
     fn bar(self: Foo<'b,'a>) {}
-    //~^ ERROR mismatched types: expected `Foo<'a, 'b>`, found `Foo<'b, 'a>`
-    //~^^ ERROR mismatched types: expected `Foo<'a, 'b>`, found `Foo<'b, 'a>`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<'a, 'b>`
+    //~| found `Foo<'b, 'a>`
+    //~| lifetime mismatch
+    //~| ERROR mismatched types
+    //~| expected `Foo<'a, 'b>`
+    //~| found `Foo<'b, 'a>`
+    //~| lifetime mismatch
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/fn-item-type.rs b/src/test/compile-fail/fn-item-type.rs
index b2394a29899..5015810ff47 100644
--- a/src/test/compile-fail/fn-item-type.rs
+++ b/src/test/compile-fail/fn-item-type.rs
@@ -18,8 +18,16 @@ fn eq<T>(x: T, y: T) { }
 
 fn main() {
     let f = if true { foo } else { bar };
-    //~^ ERROR expected fn item, found a different fn item
+    //~^ ERROR if and else have incompatible types
+    //~| expected `fn(isize) -> isize {foo}`
+    //~| found `fn(isize) -> isize {bar}`
+    //~| expected fn item,
+    //~| found a different fn item
 
     eq(foo, bar);
-    //~^ ERROR expected fn item, found a different fn item
+    //~^ ERROR mismatched types
+    //~|  expected `fn(isize) -> isize {foo}`
+    //~|  found `fn(isize) -> isize {bar}`
+    //~|  expected fn item
+    //~|  found a different fn item
 }
diff --git a/src/test/compile-fail/fn-trait-formatting.rs b/src/test/compile-fail/fn-trait-formatting.rs
index 3f5a92605b7..f19e27640cb 100644
--- a/src/test/compile-fail/fn-trait-formatting.rs
+++ b/src/test/compile-fail/fn-trait-formatting.rs
@@ -14,12 +14,25 @@
 fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
 
 fn main() {
-    let _: () = (box |:_: isize| {}) as Box<FnOnce(isize)>; //~ ERROR object-safe
-    //~^ ERROR Box<core::ops::FnOnce(isize)>
+    let _: () = (box |:_: isize| {}) as Box<FnOnce(isize)>;
+    //~^ ERROR object-safe
+    //~| ERROR mismatched types
+    //~| expected `()`
+    //~| found `Box<core::ops::FnOnce(isize)>`
+    //~| expected ()
+    //~| found box
     let _: () = (box |&:_: isize, isize| {}) as Box<Fn(isize, isize)>;
-    //~^ ERROR Box<core::ops::Fn(isize, isize)>
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `Box<core::ops::Fn(isize, isize)>`
+    //~| expected ()
+    //~| found box
     let _: () = (box |&mut:| -> isize unimplemented!()) as Box<FnMut() -> isize>;
-    //~^ ERROR Box<core::ops::FnMut() -> isize>
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `Box<core::ops::FnMut() -> isize>`
+    //~| expected ()
+    //~| found box
 
     needs_fn(1is); //~ ERROR `core::ops::Fn(isize) -> isize`
 }
diff --git a/src/test/compile-fail/fully-qualified-type-name1.rs b/src/test/compile-fail/fully-qualified-type-name1.rs
index 5ab946a53e5..029acbff9c3 100644
--- a/src/test/compile-fail/fully-qualified-type-name1.rs
+++ b/src/test/compile-fail/fully-qualified-type-name1.rs
@@ -13,5 +13,9 @@
 fn main() {
     let x: Option<usize>;
     x = 5;
-    //~^ ERROR mismatched types: expected `core::option::Option<usize>`
+    //~^ ERROR mismatched types
+    //~| expected `core::option::Option<usize>`
+    //~| found `_`
+    //~| expected enum `core::option::Option`
+    //~| found integral variable
 }
diff --git a/src/test/compile-fail/fully-qualified-type-name2.rs b/src/test/compile-fail/fully-qualified-type-name2.rs
index 94af50dac0e..ab542d90800 100644
--- a/src/test/compile-fail/fully-qualified-type-name2.rs
+++ b/src/test/compile-fail/fully-qualified-type-name2.rs
@@ -20,7 +20,11 @@ mod y {
 
 fn bar(x: x::foo) -> y::foo {
     return x;
-    //~^ ERROR mismatched types: expected `y::foo`, found `x::foo`
+    //~^ ERROR mismatched types
+    //~| expected `y::foo`
+    //~| found `x::foo`
+    //~| expected enum `y::foo`
+    //~| found enum `x::foo`
 }
 
 fn main() {
diff --git a/src/test/compile-fail/fully-qualified-type-name4.rs b/src/test/compile-fail/fully-qualified-type-name4.rs
index 9250444c3e6..d6d668b366a 100644
--- a/src/test/compile-fail/fully-qualified-type-name4.rs
+++ b/src/test/compile-fail/fully-qualified-type-name4.rs
@@ -14,7 +14,11 @@ use std::option::Option;
 
 fn bar(x: usize) -> Option<usize> {
     return x;
-    //~^ ERROR mismatched types: expected `core::option::Option<usize>`
+    //~^ ERROR mismatched types
+    //~| expected `core::option::Option<usize>`
+    //~| found `usize`
+    //~| expected enum `core::option::Option`
+    //~| found usize
 }
 
 fn main() {
diff --git a/src/test/compile-fail/generic-type-params-name-repr.rs b/src/test/compile-fail/generic-type-params-name-repr.rs
index 5769b9d7932..3e34344d78b 100644
--- a/src/test/compile-fail/generic-type-params-name-repr.rs
+++ b/src/test/compile-fail/generic-type-params-name-repr.rs
@@ -19,23 +19,47 @@ struct HashMap<K, V, H = Hash<K>>;
 fn main() {
     // Ensure that the printed type doesn't include the default type params...
     let _: Foo<isize> = ();
-    //~^ ERROR mismatched types: expected `Foo<isize>`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<isize>`
+    //~| found `()`
+    //~| expected struct `Foo`
+    //~| found ()
 
     // ...even when they're present, but the same types as the defaults.
     let _: Foo<isize, B, C> = ();
-    //~^ ERROR mismatched types: expected `Foo<isize>`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<isize>`
+    //~| found `()`
+    //~| expected struct `Foo`
+    //~| found ()
 
     // Including cases where the default is using previous type params.
     let _: HashMap<String, isize> = ();
-    //~^ ERROR mismatched types: expected `HashMap<collections::string::String, isize>`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `HashMap<collections::string::String, isize>`
+    //~| found `()`
+    //~| expected struct `HashMap`
+    //~| found ()
     let _: HashMap<String, isize, Hash<String>> = ();
-    //~^ ERROR mismatched types: expected `HashMap<collections::string::String, isize>`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `HashMap<collections::string::String, isize>`
+    //~| found `()`
+    //~| expected struct `HashMap`
+    //~| found ()
 
     // But not when there's a different type in between.
     let _: Foo<A, isize, C> = ();
-    //~^ ERROR mismatched types: expected `Foo<A, isize>`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<A, isize>`
+    //~| found `()`
+    //~| expected struct `Foo`
+    //~| found ()
 
     // And don't print <> at all when there's just defaults.
     let _: Foo<A, B, C> = ();
-    //~^ ERROR mismatched types: expected `Foo`, found `()`
+    //~^ ERROR mismatched types
+    //~| expected `Foo`
+    //~| found `()`
+    //~| expected struct `Foo`
+    //~| found ()
 }
diff --git a/src/test/compile-fail/if-branch-types.rs b/src/test/compile-fail/if-branch-types.rs
index be54554a3c0..2209a02c639 100644
--- a/src/test/compile-fail/if-branch-types.rs
+++ b/src/test/compile-fail/if-branch-types.rs
@@ -10,5 +10,9 @@
 
 fn main() {
     let x = if true { 10is } else { 10us };
-    //~^ ERROR if and else have incompatible types: expected `isize`, found `usize`
+    //~^ ERROR if and else have incompatible types
+    //~| expected `isize`
+    //~| found `usize`
+    //~| expected isize
+    //~| found usize
 }
diff --git a/src/test/compile-fail/if-without-else-result.rs b/src/test/compile-fail/if-without-else-result.rs
index 89beb9a3160..a9567f4272f 100644
--- a/src/test/compile-fail/if-without-else-result.rs
+++ b/src/test/compile-fail/if-without-else-result.rs
@@ -10,6 +10,10 @@
 
 fn main() {
     let a = if true { true };
-//~^ ERROR if may be missing an else clause: expected `()`, found `bool` (expected (), found bool)
+    //~^ ERROR if may be missing an else clause
+    //~| expected `()`
+    //~| found `bool`
+    //~| expected ()
+    //~| found bool
     println!("{}", a);
 }
diff --git a/src/test/compile-fail/integer-literal-suffix-inference.rs b/src/test/compile-fail/integer-literal-suffix-inference.rs
index 1e42a9447f6..5d9314faef9 100644
--- a/src/test/compile-fail/integer-literal-suffix-inference.rs
+++ b/src/test/compile-fail/integer-literal-suffix-inference.rs
@@ -39,62 +39,242 @@ fn main() {
     fn id_u64(n: u64) -> u64 { n }
 
     id_i8(a8); // ok
-    id_i8(a16); //~ ERROR mismatched types: expected `i8`, found `i16`
-    id_i8(a32); //~ ERROR mismatched types: expected `i8`, found `i32`
-    id_i8(a64); //~ ERROR mismatched types: expected `i8`, found `i64`
+    id_i8(a16);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i16`
+    //~| expected i8
+    //~| found i16
+    id_i8(a32);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i32`
+    //~| expected i8
+    //~| found i32
+    id_i8(a64);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i64`
+    //~| expected i8
+    //~| found i64
 
-    id_i16(a8); //~ ERROR mismatched types: expected `i16`, found `i8`
+    id_i16(a8);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i8`
+    //~| expected i16
+    //~| found i8
     id_i16(a16); // ok
-    id_i16(a32); //~ ERROR mismatched types: expected `i16`, found `i32`
-    id_i16(a64); //~ ERROR mismatched types: expected `i16`, found `i64`
+    id_i16(a32);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i32`
+    //~| expected i16
+    //~| found i32
+    id_i16(a64);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i64`
+    //~| expected i16
+    //~| found i64
 
-    id_i32(a8); //~ ERROR mismatched types: expected `i32`, found `i8`
-    id_i32(a16); //~ ERROR mismatched types: expected `i32`, found `i16`
+    id_i32(a8);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i8`
+    //~| expected i32
+    //~| found i8
+    id_i32(a16);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i16`
+    //~| expected i32
+    //~| found i16
     id_i32(a32); // ok
-    id_i32(a64); //~ ERROR mismatched types: expected `i32`, found `i64`
+    id_i32(a64);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i64`
+    //~| expected i32
+    //~| found i64
 
-    id_i64(a8); //~ ERROR mismatched types: expected `i64`, found `i8`
-    id_i64(a16); //~ ERROR mismatched types: expected `i64`, found `i16`
-    id_i64(a32); //~ ERROR mismatched types: expected `i64`, found `i32`
+    id_i64(a8);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i8`
+    //~| expected i64
+    //~| found i8
+    id_i64(a16);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i16`
+    //~| expected i64
+    //~| found i16
+    id_i64(a32);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i32`
+    //~| expected i64
+    //~| found i32
     id_i64(a64); // ok
 
     id_i8(c8); // ok
-    id_i8(c16); //~ ERROR mismatched types: expected `i8`, found `i16`
-    id_i8(c32); //~ ERROR mismatched types: expected `i8`, found `i32`
-    id_i8(c64); //~ ERROR mismatched types: expected `i8`, found `i64`
+    id_i8(c16);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i16`
+    //~| expected i8
+    //~| found i16
+    id_i8(c32);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i32`
+    //~| expected i8
+    //~| found i32
+    id_i8(c64);
+    //~^ ERROR mismatched types
+    //~| expected `i8`
+    //~| found `i64`
+    //~| expected i8
+    //~| found i64
 
-    id_i16(c8); //~ ERROR mismatched types: expected `i16`, found `i8`
+    id_i16(c8);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i8`
+    //~| expected i16
+    //~| found i8
     id_i16(c16); // ok
-    id_i16(c32); //~ ERROR mismatched types: expected `i16`, found `i32`
-    id_i16(c64); //~ ERROR mismatched types: expected `i16`, found `i64`
+    id_i16(c32);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i32`
+    //~| expected i16
+    //~| found i32
+    id_i16(c64);
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `i64`
+    //~| expected i16
+    //~| found i64
 
-    id_i32(c8); //~ ERROR mismatched types: expected `i32`, found `i8`
-    id_i32(c16); //~ ERROR mismatched types: expected `i32`, found `i16`
+    id_i32(c8);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i8`
+    //~| expected i32
+    //~| found i8
+    id_i32(c16);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i16`
+    //~| expected i32
+    //~| found i16
     id_i32(c32); // ok
-    id_i32(c64); //~ ERROR mismatched types: expected `i32`, found `i64`
+    id_i32(c64);
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i64`
+    //~| expected i32
+    //~| found i64
 
-    id_i64(a8); //~ ERROR mismatched types: expected `i64`, found `i8`
-    id_i64(a16); //~ ERROR mismatched types: expected `i64`, found `i16`
-    id_i64(a32); //~ ERROR mismatched types: expected `i64`, found `i32`
+    id_i64(a8);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i8`
+    //~| expected i64
+    //~| found i8
+    id_i64(a16);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i16`
+    //~| expected i64
+    //~| found i16
+    id_i64(a32);
+    //~^ ERROR mismatched types
+    //~| expected `i64`
+    //~| found `i32`
+    //~| expected i64
+    //~| found i32
     id_i64(a64); // ok
 
     id_u8(b8); // ok
-    id_u8(b16); //~ ERROR mismatched types: expected `u8`, found `u16`
-    id_u8(b32); //~ ERROR mismatched types: expected `u8`, found `u32`
-    id_u8(b64); //~ ERROR mismatched types: expected `u8`, found `u64`
+    id_u8(b16);
+    //~^ ERROR mismatched types
+    //~| expected `u8`
+    //~| found `u16`
+    //~| expected u8
+    //~| found u16
+    id_u8(b32);
+    //~^ ERROR mismatched types
+    //~| expected `u8`
+    //~| found `u32`
+    //~| expected u8
+    //~| found u32
+    id_u8(b64);
+    //~^ ERROR mismatched types
+    //~| expected `u8`
+    //~| found `u64`
+    //~| expected u8
+    //~| found u64
 
-    id_u16(b8); //~ ERROR mismatched types: expected `u16`, found `u8`
+    id_u16(b8);
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `u8`
+    //~| expected u16
+    //~| found u8
     id_u16(b16); // ok
-    id_u16(b32); //~ ERROR mismatched types: expected `u16`, found `u32`
-    id_u16(b64); //~ ERROR mismatched types: expected `u16`, found `u64`
+    id_u16(b32);
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `u32`
+    //~| expected u16
+    //~| found u32
+    id_u16(b64);
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `u64`
+    //~| expected u16
+    //~| found u64
 
-    id_u32(b8); //~ ERROR mismatched types: expected `u32`, found `u8`
-    id_u32(b16); //~ ERROR mismatched types: expected `u32`, found `u16`
+    id_u32(b8);
+    //~^ ERROR mismatched types
+    //~| expected `u32`
+    //~| found `u8`
+    //~| expected u32
+    //~| found u8
+    id_u32(b16);
+    //~^ ERROR mismatched types
+    //~| expected `u32`
+    //~| found `u16`
+    //~| expected u32
+    //~| found u16
     id_u32(b32); // ok
-    id_u32(b64); //~ ERROR mismatched types: expected `u32`, found `u64`
+    id_u32(b64);
+    //~^ ERROR mismatched types
+    //~| expected `u32`
+    //~| found `u64`
+    //~| expected u32
+    //~| found u64
 
-    id_u64(b8); //~ ERROR mismatched types: expected `u64`, found `u8`
-    id_u64(b16); //~ ERROR mismatched types: expected `u64`, found `u16`
-    id_u64(b32); //~ ERROR mismatched types: expected `u64`, found `u32`
+    id_u64(b8);
+    //~^ ERROR mismatched types
+    //~| expected `u64`
+    //~| found `u8`
+    //~| expected u64
+    //~| found u8
+    id_u64(b16);
+    //~^ ERROR mismatched types
+    //~| expected `u64`
+    //~| found `u16`
+    //~| expected u64
+    //~| found u16
+    id_u64(b32);
+    //~^ ERROR mismatched types
+    //~| expected `u64`
+    //~| found `u32`
+    //~| expected u64
+    //~| found u32
     id_u64(b64); // ok
 }
diff --git a/src/test/compile-fail/integral-variable-unification-error.rs b/src/test/compile-fail/integral-variable-unification-error.rs
index fbbe4cf8dbc..3374f715917 100644
--- a/src/test/compile-fail/integral-variable-unification-error.rs
+++ b/src/test/compile-fail/integral-variable-unification-error.rs
@@ -11,5 +11,9 @@
 fn main() {
     let mut x = 2;
     x = 5.0;
-//~^ ERROR expected `_`, found `_` (expected integral variable, found floating-point variable)
+    //~^ ERROR mismatched types
+    //~| expected `_`
+    //~| found `_`
+    //~| expected integral variable
+    //~| found floating-point variable
 }
diff --git a/src/test/compile-fail/issue-10176.rs b/src/test/compile-fail/issue-10176.rs
index 832cc57bd24..6e84e777898 100644
--- a/src/test/compile-fail/issue-10176.rs
+++ b/src/test/compile-fail/issue-10176.rs
@@ -10,7 +10,11 @@
 
 fn f() -> isize {
     (return 1, return 2)
-//~^ ERROR mismatched types: expected `isize`, found `(_, _)` (expected isize, found tuple)
+//~^ ERROR mismatched types
+//~| expected `isize`
+//~| found `(_, _)`
+//~| expected isize
+//~| found tuple
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-11319.rs b/src/test/compile-fail/issue-11319.rs
index c818b3bb26c..d3e44b71b1c 100644
--- a/src/test/compile-fail/issue-11319.rs
+++ b/src/test/compile-fail/issue-11319.rs
@@ -10,7 +10,11 @@
 
 fn main() {
     match Some(10) {
-    //~^ ERROR match arms have incompatible types: expected `bool`, found `()`
+    //~^ ERROR match arms have incompatible types:
+    //~| expected `bool`
+    //~| found `()`
+    //~| expected bool
+    //~| found ()
         Some(5) => false,
         Some(2) => true,
         None    => (), //~ NOTE match arm with an incompatible type
diff --git a/src/test/compile-fail/issue-11771.rs b/src/test/compile-fail/issue-11771.rs
index 7ce23e1f6ac..2de86e527ef 100644
--- a/src/test/compile-fail/issue-11771.rs
+++ b/src/test/compile-fail/issue-11771.rs
@@ -11,11 +11,19 @@
 fn main() {
     let x = ();
     1 +
-    x //~ ERROR mismatched types: expected `_`, found `()` (expected integral variable, found ())
+    x //~  ERROR mismatched types
+      //~| expected `_`
+      //~| found `()`
+      //~| expected integral variable
+      //~| found ()
     ;
 
     let x: () = ();
     1 +
-    x //~ ERROR mismatched types: expected `_`, found `()` (expected integral variable, found ())
+    x //~  ERROR mismatched types
+      //~| expected `_`
+      //~| found `()`
+      //~| expected integral variable
+      //~| found ()
     ;
 }
diff --git a/src/test/compile-fail/issue-12997-2.rs b/src/test/compile-fail/issue-12997-2.rs
index 39957a24226..1cf534e7e41 100644
--- a/src/test/compile-fail/issue-12997-2.rs
+++ b/src/test/compile-fail/issue-12997-2.rs
@@ -12,6 +12,10 @@
 
 //! Test that makes sure wrongly-typed bench functions are rejected
 
-// error-pattern:expected &-ptr, found isize
 #[bench]
 fn bar(x: isize) { }
+//~^ ERROR mismatched types
+//~| expected `fn(&mut test::Bencher)`
+//~| found `fn(isize) {bar}`
+//~| expected &-ptr
+//~| found isize
diff --git a/src/test/compile-fail/issue-13058.rs b/src/test/compile-fail/issue-13058.rs
index eee82483cae..61b50ef705f 100644
--- a/src/test/compile-fail/issue-13058.rs
+++ b/src/test/compile-fail/issue-13058.rs
@@ -35,5 +35,9 @@ fn check<'r, I: Iterator<Item=usize>, T: Itble<'r, usize, I>>(cont: &T) -> bool
 
 fn main() {
     check((3us, 5us));
-//~^ ERROR mismatched types: expected `&_`, found `(usize, usize)` (expected &-ptr, found tuple)
+//~^ ERROR mismatched types
+//~| expected `&_`
+//~| found `(usize, usize)`
+//~| expected &-ptr
+//~| found tuple
 }
diff --git a/src/test/compile-fail/issue-13359.rs b/src/test/compile-fail/issue-13359.rs
index 2e338860377..c53e5760941 100644
--- a/src/test/compile-fail/issue-13359.rs
+++ b/src/test/compile-fail/issue-13359.rs
@@ -14,8 +14,16 @@ fn bar(_s: u32) { }
 
 fn main() {
     foo(1*(1 as isize));
-    //~^ ERROR: mismatched types: expected `i16`, found `isize` (expected i16, found isize)
+    //~^ ERROR mismatched types
+    //~| expected `i16`
+    //~| found `isize`
+    //~| expected i16
+    //~| found isize
 
     bar(1*(1 as usize));
-    //~^ ERROR: mismatched types: expected `u32`, found `usize` (expected u32, found usize)
+    //~^ ERROR mismatched types
+    //~| expected `u32`
+    //~| found `usize`
+    //~| expected u32
+    //~| found usize
 }
diff --git a/src/test/compile-fail/issue-13466.rs b/src/test/compile-fail/issue-13466.rs
index 7d554545b5e..09e2905dc40 100644
--- a/src/test/compile-fail/issue-13466.rs
+++ b/src/test/compile-fail/issue-13466.rs
@@ -15,7 +15,18 @@ pub fn main() {
     // the actual arm `Result<T, E>` has two. typeck should not be
     // tricked into looking up a non-existing second type parameter.
     let _x: usize = match Some(1us) {
-        Ok(u) => u, //~ ERROR  mismatched types: expected `core::option::Option<usize>`
-        Err(e) => panic!(e)  //~ ERROR mismatched types: expected `core::option::Option<usize>`
+        Ok(u) => u,
+        //~^ ERROR mismatched types
+        //~| expected `core::option::Option<usize>`
+        //~| found `core::result::Result<_, _>`
+        //~| expected enum `core::option::Option`
+        //~| found enum `core::result::Result`
+
+        Err(e) => panic!(e)
+        //~^ ERROR mismatched types
+        //~| expected `core::option::Option<usize>`
+        //~| found `core::result::Result<_, _>`
+        //~| expected enum `core::option::Option`
+        //~| found enum `core::result::Result`
     };
 }
diff --git a/src/test/compile-fail/issue-13482-2.rs b/src/test/compile-fail/issue-13482-2.rs
index ef7d3d4d158..86a79416c77 100644
--- a/src/test/compile-fail/issue-13482-2.rs
+++ b/src/test/compile-fail/issue-13482-2.rs
@@ -14,8 +14,11 @@ fn main() {
     let x = [1,2];
     let y = match x {
         [] => None,
-        //~^ ERROR types: expected `[_#0i; 2]`, found `[_#7t; 0]`
-        //         (expected array of 2 elements, found array of 0 elements)
+//~^ ERROR mismatched types
+//~| expected `[_#0i; 2]`
+//~| found `[_#7t; 0]`
+//~| expected an array with a fixed size of 2 elements
+//~| found one with 0 elements
         [a,_] => Some(a)
     };
 }
diff --git a/src/test/compile-fail/issue-13482.rs b/src/test/compile-fail/issue-13482.rs
index 157280b1719..a345ce79612 100644
--- a/src/test/compile-fail/issue-13482.rs
+++ b/src/test/compile-fail/issue-13482.rs
@@ -12,8 +12,10 @@ fn main() {
   let x = [1,2];
   let y = match x {
     [] => None,
-//~^ ERROR types: expected `[_; 2]`, found `[_; 0]`
-//         (expected array of 2 elements, found array of 0 elements)
+    //~^ ERROR mismatched types
+    //~| expected `[_; 2]`
+    //~| found `[_; 0]`
+    //~| expected array with a fixed size of 2 elements
     [a,_] => Some(a)
   };
 }
diff --git a/src/test/compile-fail/issue-13624.rs b/src/test/compile-fail/issue-13624.rs
index 83612823c59..2a5805790a7 100644
--- a/src/test/compile-fail/issue-13624.rs
+++ b/src/test/compile-fail/issue-13624.rs
@@ -15,7 +15,11 @@ mod a {
 
   pub fn get_enum_struct_variant() -> () {
     Enum::EnumStructVariant { x: 1, y: 2, z: 3 }
-//~^ ERROR mismatched types: expected `()`, found `a::Enum` (expected (), found enum a::Enum)
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `a::Enum`
+    //~| expected ()
+    //~| found enum `a::Enum`
   }
 }
 
@@ -27,8 +31,11 @@ mod b {
       let enum_struct_variant = ::a::get_enum_struct_variant();
       match enum_struct_variant {
         a::Enum::EnumStructVariant { x, y, z } => {
-        //~^ ERROR mismatched types: expected `()`, found `a::Enum`
-        //         (expected (), found enum a::Enum)
+        //~^ ERROR mismatched types
+        //~| expected `()`
+        //~| found `a::Enum`
+        //~| expected ()
+        // found enum `a::Enum`
         }
       }
     }
diff --git a/src/test/compile-fail/issue-14091.rs b/src/test/compile-fail/issue-14091.rs
index c2ad09f5cb4..3ceb465cb4b 100644
--- a/src/test/compile-fail/issue-14091.rs
+++ b/src/test/compile-fail/issue-14091.rs
@@ -8,6 +8,10 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern: expected `bool`, found `_` (expected bool, found integral variable)
+// error-pattern:mismatched types
+// error-pattern:expected `bool`
+// error-pattern:found `_`
+// error-pattern:expected bool
+// error-pattern:found integral variable
 
 fn main(){assert!(1,1);}
diff --git a/src/test/compile-fail/issue-14541.rs b/src/test/compile-fail/issue-14541.rs
index ac49f8b99cf..deb8f00cd01 100644
--- a/src/test/compile-fail/issue-14541.rs
+++ b/src/test/compile-fail/issue-14541.rs
@@ -13,8 +13,11 @@ struct vec3 { y: f32, z: f32 }
 
 fn make(v: vec2) {
     let vec3 { y: _, z: _ } = v;
-    //~^ ERROR mismatched types: expected `vec2`, found `vec3`
-    //         (expected struct vec2, found struct vec3)
+    //~^ ERROR mismatched types
+    //~| expected `vec2`
+    //~| found `vec3`
+    //~| expected struct `vec2`
+    //~| found struct `vec3`
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/issue-14845.rs b/src/test/compile-fail/issue-14845.rs
index 5166d84a025..d7ff6f2fe63 100644
--- a/src/test/compile-fail/issue-14845.rs
+++ b/src/test/compile-fail/issue-14845.rs
@@ -16,9 +16,17 @@ struct X {
 fn main() {
     let x = X { a: [0] };
     let _f = &x.a as *mut u8;
-    //~^ ERROR mismatched types: expected `*mut u8`, found `&[u8; 1]`
+    //~^ ERROR mismatched types
+    //~| expected `*mut u8`
+    //~| found `&[u8; 1]`
+    //~| expected u8
+    //~| found array of 1 elements
 
     let local = [0u8];
     let _v = &local as *mut u8;
-    //~^ ERROR mismatched types: expected `*mut u8`, found `&[u8; 1]`
+    //~^ ERROR mismatched types
+    //~| expected `*mut u8`
+    //~| found `&[u8; 1]`
+    //~| expected u8,
+    //~| found array of 1 elements
 }
diff --git a/src/test/compile-fail/issue-15783.rs b/src/test/compile-fail/issue-15783.rs
index d363f2f834b..7080db23d42 100644
--- a/src/test/compile-fail/issue-15783.rs
+++ b/src/test/compile-fail/issue-15783.rs
@@ -16,6 +16,10 @@ fn main() {
     let name = "Foo";
     let x = Some(&[name.as_slice()]);
     let msg = foo(x);
-//~^ ERROR mismatched types: expected `core::option::Option<&[&str]>`
+//~^ ERROR mismatched types
+//~| expected `core::option::Option<&[&str]>`
+//~| found `core::option::Option<&[&str; 1]>`
+//~| expected slice
+//~| found array of 1 elements
     assert_eq!(msg, 3);
 }
diff --git a/src/test/compile-fail/issue-15896.rs b/src/test/compile-fail/issue-15896.rs
index c4373ba3351..7381ade263b 100644
--- a/src/test/compile-fail/issue-15896.rs
+++ b/src/test/compile-fail/issue-15896.rs
@@ -19,8 +19,11 @@ fn main() {
     let u = match e {
         E::B(
           Tau{t: x},
-          //~^ ERROR mismatched types: expected `main::R`, found `main::Tau`
-          //        (expected enum main::R, found struct main::Tau)
+          //~^ ERROR mismatched types
+          //~| expected `main::R`
+          //~| found `main::Tau`
+          //~| expected enum `main::R`
+          //~| found struct `main::Tau`
           _) => x,
     };
 }
diff --git a/src/test/compile-fail/issue-16338.rs b/src/test/compile-fail/issue-16338.rs
index f62bccb22f3..ba936561ae5 100644
--- a/src/test/compile-fail/issue-16338.rs
+++ b/src/test/compile-fail/issue-16338.rs
@@ -12,7 +12,10 @@ use std::raw::Slice;
 
 fn main() {
     let Slice { data: data, len: len } = "foo";
-    //~^ ERROR mismatched types: expected `&str`, found `core::raw::Slice<_>`
-    //         (expected &-ptr, found struct core::raw::Slice)
+    //~^ ERROR mismatched types
+    //~| expected `&str`
+    //~| found `core::raw::Slice<_>`
+    //~| expected &-ptr
+    //~| found struct `core::raw::Slice`
 }
 
diff --git a/src/test/compile-fail/issue-16401.rs b/src/test/compile-fail/issue-16401.rs
index 4890cc52c00..b943ef510da 100644
--- a/src/test/compile-fail/issue-16401.rs
+++ b/src/test/compile-fail/issue-16401.rs
@@ -13,8 +13,11 @@ use std::raw::Slice;
 fn main() {
     match () {
         Slice { data: data, len: len } => (),
-        //~^ ERROR mismatched types: expected `()`, found `core::raw::Slice<_>`
-        //         (expected (), found struct core::raw::Slice)
+        //~^ ERROR mismatched types
+        //~| expected `()`
+        //~| found `core::raw::Slice<_>`
+        //~| expected ()
+        //~| found struct `core::raw::Slice`
         _ => unreachable!()
     }
 }
diff --git a/src/test/compile-fail/issue-17033.rs b/src/test/compile-fail/issue-17033.rs
index 5048a9aa919..6010e206920 100644
--- a/src/test/compile-fail/issue-17033.rs
+++ b/src/test/compile-fail/issue-17033.rs
@@ -11,7 +11,11 @@
 #![feature(overloaded_calls)]
 
 fn f<'r>(p: &'r mut fn(p: &mut ())) {
-    (*p)(()) //~ ERROR mismatched types: expected `&mut ()`, found `()`
+    (*p)(()) //~  ERROR mismatched types
+             //~| expected `&mut ()`
+             //~| found `()`
+             //~| expected &-ptr
+             //~| found ()
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-17283.rs b/src/test/compile-fail/issue-17283.rs
index 0c9fd9d9486..4889658d083 100644
--- a/src/test/compile-fail/issue-17283.rs
+++ b/src/test/compile-fail/issue-17283.rs
@@ -21,17 +21,29 @@ fn main() {
 
     // `x { ... }` should not be interpreted as a struct literal here
     if x = x {
-        //~^ ERROR mismatched types: expected `bool`, found `()` (expected bool, found ())
+        //~^ ERROR mismatched types
+        //~| expected `bool`
+        //~| found `()`
+        //~| expected bool
+        //~| found ()
         println!("{}", x);
     }
     // Explicit parentheses on the left should match behavior of above
     if (x = x) {
-        //~^ ERROR mismatched types: expected `bool`, found `()` (expected bool, found ())
+        //~^ ERROR mismatched types
+        //~| expected `bool`
+        //~| found `()`
+        //~| expected bool
+        //~| found ()
         println!("{}", x);
     }
     // The struct literal interpretation is fine with explicit parentheses on the right
     if y = (Foo { foo: x }) {
-        //~^ ERROR mismatched types: expected `bool`, found `()` (expected bool, found ())
+        //~^ ERROR mismatched types
+        //~| expected `bool`
+        //~| found `()`
+        //~| expected bool
+        //~| found ()
         println!("{}", x);
     }
 }
diff --git a/src/test/compile-fail/issue-17740.rs b/src/test/compile-fail/issue-17740.rs
index 73f86fee903..b4791eba76e 100644
--- a/src/test/compile-fail/issue-17740.rs
+++ b/src/test/compile-fail/issue-17740.rs
@@ -14,8 +14,14 @@ struct Foo<'a> {
 
 impl <'a> Foo<'a>{
     fn bar(self: &mut Foo) {
-    //~^ mismatched types: expected `Foo<'a>`, found `Foo<'_>` (lifetime mismatch)
-    //~| mismatched types: expected `Foo<'a>`, found `Foo<'_>` (lifetime mismatch)
+    //~^ mismatched types
+    //~| expected `Foo<'a>`
+    //~| found `Foo<'_>`
+    //~| lifetime mismatch
+    //~| mismatched types
+    //~| expected `Foo<'a>`
+    //~| found `Foo<'_>`
+    //~| lifetime mismatch
     }
 }
 
diff --git a/src/test/compile-fail/issue-17905.rs b/src/test/compile-fail/issue-17905.rs
index 1418cdf4039..9d1047f68e6 100644
--- a/src/test/compile-fail/issue-17905.rs
+++ b/src/test/compile-fail/issue-17905.rs
@@ -16,7 +16,10 @@ impl Pair<
     isize
 > {
     fn say(self: &Pair<&str, isize>) {
-//~^ ERROR mismatched types: expected `Pair<&'static str, isize>`, found `Pair<&str, isize>`
+//~^ ERROR mismatched types
+//~| expected `Pair<&'static str, isize>`
+//~| found `Pair<&str, isize>`
+//~| lifetime mismatch
         println!("{}", self);
     }
 }
diff --git a/src/test/compile-fail/issue-19991.rs b/src/test/compile-fail/issue-19991.rs
index 0f1dbfa3492..2d73b98ec1e 100644
--- a/src/test/compile-fail/issue-19991.rs
+++ b/src/test/compile-fail/issue-19991.rs
@@ -12,7 +12,11 @@
 // clause does not exist, instead of the unsympathetic "match arms have incompatible types"
 
 fn main() {
-    if let Some(homura) = Some("madoka") { //~ ERROR missing an else clause: expected `()`
+    if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
+                                           //~| expected `()`
+                                           //~| found `i32`
+                                           //~| expected ()
+                                           //~| found i32
         765i32
     };
 }
diff --git a/src/test/compile-fail/issue-2951.rs b/src/test/compile-fail/issue-2951.rs
index 694bf05b210..d0781b56580 100644
--- a/src/test/compile-fail/issue-2951.rs
+++ b/src/test/compile-fail/issue-2951.rs
@@ -10,7 +10,12 @@
 
 fn foo<T, U>(x: T, y: U) {
     let mut xx = x;
-    xx = y; //~ ERROR expected `T`, found `U`
+    xx = y;
+    //~^  ERROR mismatched types
+    //~| expected `T`
+    //~| found `U`
+    //~| expected type parameter
+    //~| found a different type parameter
 }
 
 fn main() {
diff --git a/src/test/compile-fail/issue-3477.rs b/src/test/compile-fail/issue-3477.rs
index 798a8cfec9a..5e7c23164cb 100644
--- a/src/test/compile-fail/issue-3477.rs
+++ b/src/test/compile-fail/issue-3477.rs
@@ -9,5 +9,10 @@
 // except according to those terms.
 
 fn main() {
-    let _p: char = 100; //~ ERROR mismatched types: expected `char`, found
+    let _p: char = 100;
+    //~^ ERROR mismatched types
+    //~| expected `char`
+    //~| found `u8`
+    //~| expected char
+    //~| found u8
 }
diff --git a/src/test/compile-fail/issue-3563.rs b/src/test/compile-fail/issue-3563.rs
index 86ab9be77fc..7ebc5b7a5b9 100644
--- a/src/test/compile-fail/issue-3563.rs
+++ b/src/test/compile-fail/issue-3563.rs
@@ -10,8 +10,13 @@
 
 trait A {
     fn a(&self) {
-        |&:| self.b() //~ ERROR type `&Self` does not implement any method in scope named `b`
-        //~^ ERROR expected (), found closure
+        |&:| self.b()
+        //~^ ERROR type `&Self` does not implement any method in scope named `b`
+        //~| ERROR mismatched types
+        //~| expected `()`
+        //~| found closure
+        //~| expected ()
+        //~| found closure
     }
 }
 fn main() {}
diff --git a/src/test/compile-fail/issue-3680.rs b/src/test/compile-fail/issue-3680.rs
index f018a02a945..4aff95b57de 100644
--- a/src/test/compile-fail/issue-3680.rs
+++ b/src/test/compile-fail/issue-3680.rs
@@ -11,7 +11,10 @@
 fn main() {
     match None {
         Err(_) => ()
-        //~^ ERROR mismatched types: expected `core::option::Option<_>`
-        //         , found `core::result::Result<_, _>`
+        //~^ ERROR mismatched types
+        //~| expected `core::option::Option<_>`
+        //~| found `core::result::Result<_, _>`
+        //~| expected enum `core::option::Option`
+        //~| found enum `core::result::Result`
     }
 }
diff --git a/src/test/compile-fail/issue-4201.rs b/src/test/compile-fail/issue-4201.rs
index 0391c73d90a..b5af1f03b63 100644
--- a/src/test/compile-fail/issue-4201.rs
+++ b/src/test/compile-fail/issue-4201.rs
@@ -12,7 +12,11 @@ fn main() {
     let a = if true {
         0
     } else if false {
-//~^ ERROR if may be missing an else clause: expected `()`, found `_`
+//~^ ERROR if may be missing an else clause
+//~| expected `()`
+//~| found `_`
+//~| expected ()
+//~| found integral variable
         1
     };
 }
diff --git a/src/test/compile-fail/issue-4517.rs b/src/test/compile-fail/issue-4517.rs
index 1943f1e5a19..881e124fd68 100644
--- a/src/test/compile-fail/issue-4517.rs
+++ b/src/test/compile-fail/issue-4517.rs
@@ -13,6 +13,9 @@ fn bar(int_param: usize) {}
 fn main() {
     let foo: [u8; 4] = [1u8; 4us];
     bar(foo);
-    //~^ ERROR mismatched types: expected `usize`, found `[u8; 4]`
-    //         (expected usize, found vector)
+    //~^ ERROR mismatched types
+    //~| expected `usize`
+    //~| found `[u8; 4]`
+    //~| expected usize
+    //~| found array of 4 elements
 }
diff --git a/src/test/compile-fail/issue-4968.rs b/src/test/compile-fail/issue-4968.rs
index 88933c0add9..e7cd20f38a1 100644
--- a/src/test/compile-fail/issue-4968.rs
+++ b/src/test/compile-fail/issue-4968.rs
@@ -13,6 +13,9 @@
 const A: (isize,isize) = (4,2);
 fn main() {
     match 42 { A => () }
-    //~^ ERROR mismatched types: expected `_`, found `(isize, isize)`
-    //         (expected integral variable, found tuple)
+    //~^ ERROR mismatched types
+    //~| expected `_`
+    //~| found `(isize, isize)`
+    //~| expected integral variable
+    //~| found tuple
 }
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
 }
diff --git a/src/test/compile-fail/issue-5358-1.rs b/src/test/compile-fail/issue-5358-1.rs
index 96bad3a6a44..32702d3e2f6 100644
--- a/src/test/compile-fail/issue-5358-1.rs
+++ b/src/test/compile-fail/issue-5358-1.rs
@@ -13,7 +13,12 @@ struct S(Either<usize, usize>);
 
 fn main() {
     match S(Either::Left(5)) {
-        Either::Right(_) => {}  //~ ERROR mismatched types: expected `S`, found `Either
+        Either::Right(_) => {}
+        //~^ ERROR mismatched types
+        //~| expected `S`
+        //~| found `Either<_, _>`
+        //~| expected struct `S`
+        //~| found enum `Either`
         _ => {}
     }
 }
diff --git a/src/test/compile-fail/issue-5500.rs b/src/test/compile-fail/issue-5500.rs
index 56867349065..565634191be 100644
--- a/src/test/compile-fail/issue-5500.rs
+++ b/src/test/compile-fail/issue-5500.rs
@@ -10,5 +10,9 @@
 
 fn main() {
     &panic!()
-    //~^ ERROR mismatched types: expected `()`, found `&_` (expected (), found &-ptr)
+    //~^ ERROR mismatched types
+    //~| expected `()`
+    //~| found `&_`
+    //~| expected ()
+    //~| found &-ptr
 }
diff --git a/src/test/compile-fail/issue-7061.rs b/src/test/compile-fail/issue-7061.rs
index c6869c44057..e261249bc99 100644
--- a/src/test/compile-fail/issue-7061.rs
+++ b/src/test/compile-fail/issue-7061.rs
@@ -12,7 +12,11 @@ struct BarStruct;
 
 impl<'a> BarStruct {
     fn foo(&'a mut self) -> Box<BarStruct> { self }
-    //~^ ERROR: error: mismatched types: expected `Box<BarStruct>`, found `&'a mut BarStruct
+    //~^ ERROR mismatched types
+    //~| expected `Box<BarStruct>`
+    //~| found `&'a mut BarStruct`
+    //~| expected box
+    //~| found &-ptr
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-7092.rs b/src/test/compile-fail/issue-7092.rs
index 116639f4945..eefb34fbe4c 100644
--- a/src/test/compile-fail/issue-7092.rs
+++ b/src/test/compile-fail/issue-7092.rs
@@ -14,7 +14,11 @@ enum Whatever {
 fn foo(x: Whatever) {
     match x {
         Some(field) =>
-//~^ ERROR: mismatched types: expected `Whatever`, found `core::option::Option<_>`
+//~^ ERROR mismatched types
+//~| expected `Whatever`
+//~| found `core::option::Option<_>`
+//~| expected enum `Whatever`
+//~| found enum `core::option::Option`
             field.access(), //~ ERROR the type of this value must be known in this context
     }
 }
diff --git a/src/test/compile-fail/issue-7867.rs b/src/test/compile-fail/issue-7867.rs
index e459a243cc8..0e81ec19c81 100644
--- a/src/test/compile-fail/issue-7867.rs
+++ b/src/test/compile-fail/issue-7867.rs
@@ -14,14 +14,27 @@ mod foo { pub fn bar() {} }
 
 fn main() {
     match (true, false) {
-        A::B => (), //~ ERROR expected `(bool, bool)`, found `A` (expected tuple, found enum A)
+        A::B => (),
+        //~^ ERROR mismatched types
+        //~| expected `(bool, bool)`
+        //~| found `A`
+        //~| expected tuple
+        //~| found enum `A`
         _ => ()
     }
 
     match &Some(42is) {
-        Some(x) => (), //~ ERROR expected `&core::option::Option<isize>`,
-                       //        found `core::option::Option<_>`
-        None => ()     //~ ERROR expected `&core::option::Option<isize>`,
-                       //        found `core::option::Option<_>`
+        Some(x) => (),
+        //~^ ERROR mismatched types
+        //~| expected `&core::option::Option<isize>`
+        //~| found `core::option::Option<_>`
+        //~| expected &-ptr
+        //~| found enum `core::option::Option`
+        None => ()
+        //~^ ERROR mismatched types
+        //~| expected `&core::option::Option<isize>`
+        //~| found `core::option::Option<_>`
+        //~| expected &-ptr
+        //~| found enum `core::option::Option`
     }
 }
diff --git a/src/test/compile-fail/issue-8761.rs b/src/test/compile-fail/issue-8761.rs
index 3f9e92afba2..30e4ec8ad0e 100644
--- a/src/test/compile-fail/issue-8761.rs
+++ b/src/test/compile-fail/issue-8761.rs
@@ -10,9 +10,17 @@
 
 enum Foo {
     A = 1i64,
-    //~^ ERROR mismatched types: expected `isize`, found `i64`
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `i64`
+    //~| expected isize
+    //~| found i64
     B = 2u8
-    //~^ ERROR mismatched types: expected `isize`, found `u8`
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `u8`
+    //~| expected isize
+    //~| found u8
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/match-struct.rs b/src/test/compile-fail/match-struct.rs
index e3b47372a4f..5bda3789687 100644
--- a/src/test/compile-fail/match-struct.rs
+++ b/src/test/compile-fail/match-struct.rs
@@ -14,7 +14,12 @@ enum E { C(isize) }
 
 fn main() {
     match (S { a: 1 }) {
-        E::C(_) => (), //~ ERROR mismatched types: expected `S`, found `E`
+        E::C(_) => (),
+        //~^ ERROR mismatched types
+        //~| expected `S`
+        //~| found `E`
+        //~| expected struct `S`
+        //~| found enum `E`
         _ => ()
     }
 }
diff --git a/src/test/compile-fail/match-vec-mismatch-2.rs b/src/test/compile-fail/match-vec-mismatch-2.rs
index 6bb049f3ca5..a4abdf3ddfe 100644
--- a/src/test/compile-fail/match-vec-mismatch-2.rs
+++ b/src/test/compile-fail/match-vec-mismatch-2.rs
@@ -11,6 +11,10 @@
 fn main() {
     match () {
         [()] => { }
-//~^ ERROR mismatched types: expected `()`, found `&[_]` (expected (), found &-ptr)
+        //~^ ERROR mismatched types
+        //~| expected `()`
+        //~| found `&[_]`
+        //~| expected ()
+        //~| found &-ptr
     }
 }
diff --git a/src/test/compile-fail/method-self-arg-1.rs b/src/test/compile-fail/method-self-arg-1.rs
index 178b7319976..4d416ed42de 100644
--- a/src/test/compile-fail/method-self-arg-1.rs
+++ b/src/test/compile-fail/method-self-arg-1.rs
@@ -18,7 +18,19 @@ impl Foo {
 
 fn main() {
     let x = Foo;
-    Foo::bar(x); //~ERROR mismatched types: expected `&Foo`, found `Foo`
-    Foo::bar(&&x); //~ERROR mismatched types: expected `&Foo`, found `&&Foo`
-    Foo::bar(&42is); //~ERROR mismatched types: expected `&Foo`, found `&isize`
+    Foo::bar(x); //~  ERROR mismatched types
+                 //~| expected `&Foo`
+                 //~| found `Foo`
+                 //~| expected &-ptr
+                 //~| found struct `Foo`
+    Foo::bar(&&x); //~  ERROR mismatched types
+                   //~| expected `&Foo`
+                   //~| found `&&Foo`
+                   //~| expected struct `Foo`
+                   //~| found &-ptr
+    Foo::bar(&42is); //~  ERROR mismatched types
+                     //~| expected `&Foo`
+                     //~| found `&isize`
+                     //~| expected struct `Foo`
+                     //~| found isize
 }
diff --git a/src/test/compile-fail/mut-pattern-mismatched.rs b/src/test/compile-fail/mut-pattern-mismatched.rs
index 9f1d3d1fb39..a3d016d756f 100644
--- a/src/test/compile-fail/mut-pattern-mismatched.rs
+++ b/src/test/compile-fail/mut-pattern-mismatched.rs
@@ -13,12 +13,18 @@ fn main() {
 
     // (separate lines to ensure the spans are accurate)
 
-     let &_ //~ ERROR expected `&mut isize`, found `&_`
+     let &_ //~  ERROR mismatched types
+            //~| expected `&mut isize`
+            //~| found `&_`
+            //~| values differ in mutability
         = foo;
     let &mut _ = foo;
 
     let bar = &1is;
     let &_ = bar;
-    let &mut _ //~ ERROR expected `&isize`, found `&mut _`
+    let &mut _ //~  ERROR mismatched types
+               //~| expected `&isize`
+               //~| found `&mut _`
+               //~| values differ in mutability
          = bar;
 }
diff --git a/src/test/compile-fail/noexporttypeexe.rs b/src/test/compile-fail/noexporttypeexe.rs
index 8fa4e81c889..85a47492306 100644
--- a/src/test/compile-fail/noexporttypeexe.rs
+++ b/src/test/compile-fail/noexporttypeexe.rs
@@ -18,5 +18,9 @@ fn main() {
     // because the def_id associated with the type was
     // not convertible to a path.
   let x: isize = noexporttypelib::foo();
-    //~^ ERROR expected `isize`, found `core::option::Option<isize>`
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `core::option::Option<isize>`
+    //~| expected isize
+    //~| found enum `core::option::Option`
 }
diff --git a/src/test/compile-fail/occurs-check-2.rs b/src/test/compile-fail/occurs-check-2.rs
index bfabcff5116..fd2903a85dd 100644
--- a/src/test/compile-fail/occurs-check-2.rs
+++ b/src/test/compile-fail/occurs-check-2.rs
@@ -14,5 +14,9 @@ fn main() {
     let f;
     let g;
     g = f;
-    f = box g; //~ ERROR cyclic type of infinite size
+    f = box g;
+    //~^  ERROR mismatched types
+    //~| expected `_`
+    //~| found `Box<_>`
+    //~| cyclic type of infinite size
 }
diff --git a/src/test/compile-fail/occurs-check.rs b/src/test/compile-fail/occurs-check.rs
index 417bd9b57ee..036fcc1b9d7 100644
--- a/src/test/compile-fail/occurs-check.rs
+++ b/src/test/compile-fail/occurs-check.rs
@@ -12,5 +12,9 @@
 
 fn main() {
     let f;
-    f = box f; //~ ERROR cyclic type of infinite size
+    f = box f;
+    //~^ ERROR mismatched types
+    //~| expected `_`
+    //~| found `Box<_>`
+    //~| cyclic type of infinite size
 }
diff --git a/src/test/compile-fail/pattern-error-continue.rs b/src/test/compile-fail/pattern-error-continue.rs
index c288429dcda..aa7202574ab 100644
--- a/src/test/compile-fail/pattern-error-continue.rs
+++ b/src/test/compile-fail/pattern-error-continue.rs
@@ -30,9 +30,18 @@ fn main() {
     }
     match 'c' {
         S { .. } => (),
-        //~^ ERROR mismatched types: expected `char`, found `S` (expected char, found struct S)
+        //~^ ERROR mismatched types
+        //~| expected `char`
+        //~| found `S`
+        //~| expected char
+        //~| found struct `S`
 
         _ => ()
     }
-    f(true);            //~ ERROR mismatched types: expected `char`, found `bool`
+    f(true);
+    //~^ ERROR mismatched types
+    //~| expected `char`
+    //~| found `bool`
+    //~| expected char
+    //~| found bool
 }
diff --git a/src/test/compile-fail/pptypedef.rs b/src/test/compile-fail/pptypedef.rs
index e3c440d61ce..9e5081ed550 100644
--- a/src/test/compile-fail/pptypedef.rs
+++ b/src/test/compile-fail/pptypedef.rs
@@ -12,8 +12,16 @@ fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
 
 fn main() {
     let_in(3us, |i| { assert!(i == 3is); });
-    //~^ ERROR expected `usize`, found `isize`
+    //~^ ERROR mismatched types
+    //~| expected `usize`
+    //~| found `isize`
+    //~| expected usize
+    //~| found isize
 
     let_in(3is, |i| { assert!(i == 3us); });
-    //~^ ERROR expected `isize`, found `usize`
+    //~^ ERROR mismatched types
+    //~| expected `isize`
+    //~| found `usize`
+    //~| expected isize
+    //~| found usize
 }
diff --git a/src/test/compile-fail/ptr-coercion.rs b/src/test/compile-fail/ptr-coercion.rs
index 392a803b0dd..463754b29c7 100644
--- a/src/test/compile-fail/ptr-coercion.rs
+++ b/src/test/compile-fail/ptr-coercion.rs
@@ -14,11 +14,20 @@
 pub fn main() {
     // *const -> *mut
     let x: *const isize = &42is;
-    let x: *mut isize = x; //~ERROR values differ in mutability
+    let x: *mut isize = x; //~  ERROR mismatched types
+                           //~| expected `*mut isize`
+                           //~| found `*const isize`
+                           //~| values differ in mutability
 
     // & -> *mut
-    let x: *mut isize = &42; //~ERROR values differ in mutability
+    let x: *mut isize = &42; //~  ERROR mismatched types
+                             //~| expected `*mut isize`
+                             //~| found `&isize`
+                             //~| values differ in mutability
 
     let x: *const isize = &42;
-    let x: *mut isize = x; //~ERROR values differ in mutability
+    let x: *mut isize = x; //~  ERROR mismatched types
+                           //~| expected `*mut isize`
+                           //~| found `*const isize`
+                           //~| values differ in mutability
 }
diff --git a/src/test/compile-fail/regions-bounds.rs b/src/test/compile-fail/regions-bounds.rs
index c26740c9598..7f2889a327b 100644
--- a/src/test/compile-fail/regions-bounds.rs
+++ b/src/test/compile-fail/regions-bounds.rs
@@ -16,11 +16,17 @@ struct an_enum<'a>(&'a isize);
 struct a_class<'a> { x:&'a isize }
 
 fn a_fn1<'a,'b>(e: an_enum<'a>) -> an_enum<'b> {
-    return e; //~ ERROR mismatched types: expected `an_enum<'b>`, found `an_enum<'a>`
+    return e; //~  ERROR mismatched types
+              //~| expected `an_enum<'b>`
+              //~| found `an_enum<'a>`
+              //~| lifetime mismatch
 }
 
 fn a_fn3<'a,'b>(e: a_class<'a>) -> a_class<'b> {
-    return e; //~ ERROR mismatched types: expected `a_class<'b>`, found `a_class<'a>`
+    return e; //~  ERROR mismatched types
+              //~| expected `a_class<'b>`
+              //~| found `a_class<'a>`
+              //~| lifetime mismatch
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/regions-early-bound-error-method.rs b/src/test/compile-fail/regions-early-bound-error-method.rs
index c83fb096512..4a3ca01c849 100644
--- a/src/test/compile-fail/regions-early-bound-error-method.rs
+++ b/src/test/compile-fail/regions-early-bound-error-method.rs
@@ -27,8 +27,12 @@ impl<'a> GetRef<'a> for Box<'a> {
 
 impl<'a> Box<'a> {
     fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize {
-        g2.get() //~ ERROR cannot infer an appropriate lifetime for automatic coercion due to
-        //~^ ERROR mismatched types: expected `&'a isize`, found `&'b isize` (lifetime mismatch)
+        g2.get()
+        //~^ ERROR cannot infer an appropriate lifetime for automatic coercion due to
+        //~| ERROR mismatched types
+        //~| expected `&'a isize`
+        //~| found `&'b isize`
+        //~| lifetime mismatch
 
     }
 }
diff --git a/src/test/compile-fail/regions-early-bound-error.rs b/src/test/compile-fail/regions-early-bound-error.rs
index cc6acdca78e..57c8e3f1170 100644
--- a/src/test/compile-fail/regions-early-bound-error.rs
+++ b/src/test/compile-fail/regions-early-bound-error.rs
@@ -26,8 +26,12 @@ impl<'a,T:Clone> GetRef<'a,T> for Box<'a,T> {
 }
 
 fn get<'a,'b,G:GetRef<'a, isize>>(g1: G, b: &'b isize) -> &'b isize {
-    g1.get() //~ ERROR cannot infer an appropriate lifetime for automatic coercion due to
-    //~^ ERROR mismatched types: expected `&'b isize`, found `&'a isize` (lifetime mismatch)
+    g1.get()
+    //~^ ERROR cannot infer an appropriate lifetime for automatic coercion due to
+    //~| ERROR mismatched types
+    //~| expected `&'b isize`
+    //~| found `&'a isize`
+    //~| lifetime mismatch
 }
 
 fn main() {
diff --git a/src/test/compile-fail/regions-fn-subtyping-return-static.rs b/src/test/compile-fail/regions-fn-subtyping-return-static.rs
index ac56e8ce14d..ebf7ca289f8 100644
--- a/src/test/compile-fail/regions-fn-subtyping-return-static.rs
+++ b/src/test/compile-fail/regions-fn-subtyping-return-static.rs
@@ -53,7 +53,12 @@ fn supply_F() {
 fn supply_G() {
     want_G(foo);
     want_G(bar);
-    want_G(baz); //~ ERROR expected concrete lifetime
+    want_G(baz);
+    //~^ ERROR mismatched types
+    //~| expected `fn(&'cx S) -> &'static S`
+    //~| found `fn(&S) -> &S {baz}`
+    //~| expected concrete lifetime
+    //~| found bound lifetime parameter 'cx
 }
 
 pub fn main() {
diff --git a/src/test/compile-fail/regions-infer-paramd-indirect.rs b/src/test/compile-fail/regions-infer-paramd-indirect.rs
index 0d441380e81..1d32e8fe7b2 100644
--- a/src/test/compile-fail/regions-infer-paramd-indirect.rs
+++ b/src/test/compile-fail/regions-infer-paramd-indirect.rs
@@ -31,7 +31,10 @@ impl<'a> set_f<'a> for c<'a> {
 
     fn set_f_bad(&mut self, b: Box<b>) {
         self.f = b;
-        //~^ ERROR mismatched types: expected `Box<Box<&'a isize>>`, found `Box<Box<&isize>>`
+        //~^ ERROR mismatched types
+        //~| expected `Box<Box<&'a isize>>`
+        //~| found `Box<Box<&isize>>`
+        //~| lifetime mismatch
     }
 }
 
diff --git a/src/test/compile-fail/repeat_count.rs b/src/test/compile-fail/repeat_count.rs
index e94bf19955b..df69e13bf1e 100644
--- a/src/test/compile-fail/repeat_count.rs
+++ b/src/test/compile-fail/repeat_count.rs
@@ -14,14 +14,33 @@ fn main() {
     let n = 1;
     let a = [0; n]; //~ ERROR expected constant integer for repeat count, found variable
     let b = [0; ()];
-//~^ ERROR expected constant integer for repeat count, found non-constant expression
-//~^^ ERROR: expected `usize`, found `()`
-    let c = [0; true]; //~ ERROR expected positive integer for repeat count, found boolean
-    //~^ ERROR: expected `usize`, found `bool`
-    let d = [0; 0.5]; //~ ERROR expected positive integer for repeat count, found float
-    //~^ ERROR: expected `usize`, found `_`
-    let e = [0; "foo"]; //~ ERROR expected positive integer for repeat count, found string
-    //~^ ERROR: expected `usize`, found `&'static str`
+//~^ ERROR mismatched types
+//~| expected `usize`
+//~| found `()`
+//~| expected usize
+//~| found ()
+//~| ERROR expected constant integer for repeat count, found non-constant expression
+    let c = [0; true];
+    //~^ ERROR mismatched types
+    //~| expected `usize`
+    //~| found `bool`
+    //~| expected usize
+    //~| found bool
+    //~| ERROR expected positive integer for repeat count, found boolean
+    let d = [0; 0.5];
+    //~^ ERROR mismatched types
+    //~| expected `usize`
+    //~| found `_`
+    //~| expected usize
+    //~| found floating-point variable
+    //~| ERROR expected positive integer for repeat count, found float
+    let e = [0; "foo"];
+    //~^ ERROR mismatched types
+    //~| expected `usize`
+    //~| found `&'static str`
+    //~| expected usize
+    //~| found &-ptr
+    //~| ERROR expected positive integer for repeat count, found string
     let f = [0; -4];
     //~^ ERROR expected positive integer for repeat count, found negative integer
     let f = [0us; -1];
diff --git a/src/test/compile-fail/shift-various-bad-types.rs b/src/test/compile-fail/shift-various-bad-types.rs
index 41788584049..66aef0ec3a1 100644
--- a/src/test/compile-fail/shift-various-bad-types.rs
+++ b/src/test/compile-fail/shift-various-bad-types.rs
@@ -36,7 +36,11 @@ fn foo(p: &Panolpy) {
 
     // Type of the result follows the LHS, not the RHS:
     let _: i32 = 22_i64 >> 1_i32;
-    //~^ ERROR mismatched types: expected `i32`, found `i64`
+    //~^ ERROR mismatched types
+    //~| expected `i32`
+    //~| found `i64`
+    //~| expected i32
+    //~| found i64)
 }
 
 fn main() {
diff --git a/src/test/compile-fail/slightly-nice-generic-literal-messages.rs b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs
index a655a17c037..1203d622348 100644
--- a/src/test/compile-fail/slightly-nice-generic-literal-messages.rs
+++ b/src/test/compile-fail/slightly-nice-generic-literal-messages.rs
@@ -13,7 +13,11 @@ struct Foo<T,U>(T);
 fn main() {
     match Foo(1.1) {
         1 => {}
-    //~^ ERROR expected `Foo<_, _>`, found `_`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<_, _>`
+    //~| found `_`
+    //~| expected struct `Foo`
+    //~| found integral variable
     }
 
 }
diff --git a/src/test/compile-fail/struct-base-wrong-type.rs b/src/test/compile-fail/struct-base-wrong-type.rs
index 2bb8d32a7e3..71a2b50b612 100644
--- a/src/test/compile-fail/struct-base-wrong-type.rs
+++ b/src/test/compile-fail/struct-base-wrong-type.rs
@@ -12,11 +12,27 @@ struct Foo { a: isize, b: isize }
 struct Bar { x: isize }
 
 static bar: Bar = Bar { x: 5 };
-static foo: Foo = Foo { a: 2, ..bar }; //~ ERROR mismatched types: expected `Foo`, found `Bar`
-static foo_i: Foo = Foo { a: 2, ..4 }; //~ ERROR mismatched types: expected `Foo`
+static foo: Foo = Foo { a: 2, ..bar }; //~  ERROR mismatched types
+                                       //~| expected `Foo`
+                                       //~| found `Bar`
+                                       //~| expected struct `Foo`
+                                       //~| found struct `Bar`
+static foo_i: Foo = Foo { a: 2, ..4 }; //~  ERROR mismatched types
+                                       //~| expected `Foo`
+                                       //~| found `_`
+                                       //~| expected struct `Foo`
+                                       //~| found integral variable
 
 fn main() {
     let b = Bar { x: 5 };
-    let f = Foo { a: 2, ..b }; //~ ERROR mismatched types: expected `Foo`, found `Bar`
-    let f_i = Foo { a: 2, ..4 }; //~ ERROR mismatched types: expected `Foo`
+    let f = Foo { a: 2, ..b }; //~  ERROR mismatched types
+                               //~| expected `Foo`
+                               //~| found `Bar`
+                               //~| expected struct `Foo`
+                               //~| found struct `Bar`
+    let f_i = Foo { a: 2, ..4 }; //~  ERROR mismatched types
+                                 //~| expected `Foo`
+                                 //~| found `_`
+                                 //~| expected struct `Foo`
+                                 //~| found integral variable
 }
diff --git a/src/test/compile-fail/structure-constructor-type-mismatch.rs b/src/test/compile-fail/structure-constructor-type-mismatch.rs
index fb84c1e2ebe..a22f390499f 100644
--- a/src/test/compile-fail/structure-constructor-type-mismatch.rs
+++ b/src/test/compile-fail/structure-constructor-type-mismatch.rs
@@ -24,25 +24,33 @@ type PairF<U> = Pair<f32,U>;
 
 fn main() {
     let pt = PointF {
-        //~^ ERROR expected f32, found isize
+        //~^ ERROR structure constructor specifies a structure of type
+        //~| expected f32
+        //~| found isize
         x: 1is,
         y: 2is,
     };
 
     let pt2 = Point::<f32> {
-        //~^ ERROR expected f32, found isize
+        //~^ ERROR structure constructor specifies a structure of type
+        //~| expected f32
+        //~| found isize
         x: 3is,
         y: 4is,
     };
 
     let pair = PairF {
-        //~^ ERROR expected f32, found isize
+        //~^ ERROR structure constructor specifies a structure of type
+        //~| expected f32
+        //~| found isize
         x: 5is,
         y: 6is,
     };
 
     let pair2 = PairF::<isize> {
-        //~^ ERROR expected f32, found isize
+        //~^ ERROR structure constructor specifies a structure of type
+        //~| expected f32
+        //~| found isize
         x: 7is,
         y: 8is,
     };
diff --git a/src/test/compile-fail/suppressed-error.rs b/src/test/compile-fail/suppressed-error.rs
index 27f50be528c..44de5d8cfe3 100644
--- a/src/test/compile-fail/suppressed-error.rs
+++ b/src/test/compile-fail/suppressed-error.rs
@@ -10,6 +10,10 @@
 
 fn main() {
     let (x, y) = ();
-//~^ ERROR expected `()`, found `(_, _)` (expected (), found tuple)
+//~^ ERROR mismatched types
+//~| expected `()`
+//~| found `(_, _)`
+//~| expected ()
+//~| found tuple
     return x;
 }
diff --git a/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs b/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
index a9df449032e..660c1fa9a88 100644
--- a/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
+++ b/src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-// error-pattern:mismatched types: expected `char`, found
 // Issue #876
 
 #![no_implicit_prelude]
@@ -21,4 +20,9 @@ fn last<T>(v: Vec<&T> ) -> std::option::Option<T> {
 fn main() {
     let y;
     let x : char = last(y);
+    //~^ ERROR mismatched types
+    //~| expected `char`
+    //~| found `core::option::Option<_>`
+    //~| expected char
+    //~| found enum `core::option::Option`
 }
diff --git a/src/test/compile-fail/terr-in-field.rs b/src/test/compile-fail/terr-in-field.rs
index 1e5422a798e..60db35b879f 100644
--- a/src/test/compile-fail/terr-in-field.rs
+++ b/src/test/compile-fail/terr-in-field.rs
@@ -20,7 +20,11 @@ struct bar {
 
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
-    want_foo(b); //~ ERROR (expected struct foo, found struct bar)
+    want_foo(b); //~  ERROR mismatched types
+                 //~| expected `foo`
+                 //~| found `bar`
+                 //~| expected struct `foo`
+                 //~| found struct `bar`
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/terr-sorts.rs b/src/test/compile-fail/terr-sorts.rs
index d1a37c99c47..231d2366b48 100644
--- a/src/test/compile-fail/terr-sorts.rs
+++ b/src/test/compile-fail/terr-sorts.rs
@@ -18,7 +18,11 @@ type bar = Box<foo>;
 
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
-    want_foo(b); //~ ERROR (expected struct foo, found box)
+    want_foo(b); //~  ERROR mismatched types
+                 //~| expected `foo`
+                 //~| found `Box<foo>`
+                 //~| expected struct `foo`
+                 //~| found box
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/trait-bounds-cant-coerce.rs b/src/test/compile-fail/trait-bounds-cant-coerce.rs
index 4f405e2558d..79174552ae0 100644
--- a/src/test/compile-fail/trait-bounds-cant-coerce.rs
+++ b/src/test/compile-fail/trait-bounds-cant-coerce.rs
@@ -20,7 +20,11 @@ fn c(x: Box<Foo+Sync+Send>) {
 }
 
 fn d(x: Box<Foo>) {
-    a(x); //~ ERROR found no bounds
+    a(x); //~  ERROR mismatched types
+          //~| expected `Box<Foo + Send>`
+          //~| found `Box<Foo>`
+          //~| expected bounds `Send`
+          //~| found no bounds
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/tuple-arity-mismatch.rs b/src/test/compile-fail/tuple-arity-mismatch.rs
index 7f073a7bfdb..8ad9ca50e30 100644
--- a/src/test/compile-fail/tuple-arity-mismatch.rs
+++ b/src/test/compile-fail/tuple-arity-mismatch.rs
@@ -14,8 +14,16 @@ fn first((value, _): (isize, f64)) -> isize { value }
 
 fn main() {
     let y = first ((1,2.0,3));
-    //~^ ERROR expected a tuple with 2 elements, found one with 3 elements
+    //~^ ERROR mismatched types
+    //~| expected `(isize, f64)`
+    //~| found `(isize, f64, _)`
+    //~| expected a tuple with 2 elements
+    //~| found one with 3 elements
 
     let y = first ((1,));
-    //~^ ERROR expected `(isize, f64)`, found `(isize,)`
+    //~^ ERROR mismatched types
+    //~| expected `(isize, f64)`
+    //~| found `(isize,)`
+    //~| expected a tuple with 2 elements
+    //~| found one with 1 elements
 }
diff --git a/src/test/compile-fail/tutorial-suffix-inference-test.rs b/src/test/compile-fail/tutorial-suffix-inference-test.rs
index 1b44c7e8128..c8c596fdb4f 100644
--- a/src/test/compile-fail/tutorial-suffix-inference-test.rs
+++ b/src/test/compile-fail/tutorial-suffix-inference-test.rs
@@ -17,9 +17,17 @@ fn main() {
 
     identity_u8(x);  // after this, `x` is assumed to have type `u8`
     identity_u16(x);
-    //~^ ERROR mismatched types: expected `u16`, found `u8`
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `u8`
+    //~| expected u16
+    //~| found u8
     identity_u16(y);
-    //~^ ERROR mismatched types: expected `u16`, found `i32`
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `i32`
+    //~| expected u16
+    //~| found i32
 
     let a = 3is;
 
@@ -27,6 +35,10 @@ fn main() {
 
     identity_i(a); // ok
     identity_u16(a);
-    //~^ ERROR mismatched types: expected `u16`, found `isize`
+    //~^ ERROR mismatched types
+    //~| expected `u16`
+    //~| found `isize`
+    //~| expected u16
+    //~| found isize
 
 }
diff --git a/src/test/compile-fail/type-mismatch-multiple.rs b/src/test/compile-fail/type-mismatch-multiple.rs
index 8b0897565fb..4ab6bd53191 100644
--- a/src/test/compile-fail/type-mismatch-multiple.rs
+++ b/src/test/compile-fail/type-mismatch-multiple.rs
@@ -9,7 +9,15 @@
 // except according to those terms.
 
 // Checking that the compiler reports multiple type errors at once
-// error-pattern:mismatched types: expected `bool`
-// error-pattern:mismatched types: expected `isize`
 
 fn main() { let a: bool = 1is; let b: isize = true; }
+//~^ ERROR mismatched types
+//~| expected `bool`
+//~| found `isize`
+//~| expected bool
+//~| found isize
+//~| ERROR mismatched types
+//~| expected `isize`
+//~| found `bool`
+//~| expected isize
+//~| found bool
diff --git a/src/test/compile-fail/type-parameter-names.rs b/src/test/compile-fail/type-parameter-names.rs
index 42691fa5229..408bf72e97c 100644
--- a/src/test/compile-fail/type-parameter-names.rs
+++ b/src/test/compile-fail/type-parameter-names.rs
@@ -13,7 +13,11 @@
 
 fn foo<Foo, Bar>(x: Foo) -> Bar {
     x
-//~^ ERROR expected `Bar`, found `Foo` (expected type parameter, found a different type parameter)
+//~^ ERROR mismatched types
+//~| expected `Bar`
+//~| found `Foo`
+//~| expected type parameter
+//~| found a different type parameter
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/type-params-in-different-spaces-1.rs b/src/test/compile-fail/type-params-in-different-spaces-1.rs
index 66479202e12..de9623de7cd 100644
--- a/src/test/compile-fail/type-params-in-different-spaces-1.rs
+++ b/src/test/compile-fail/type-params-in-different-spaces-1.rs
@@ -12,7 +12,11 @@ use std::num::Int;
 
 trait BrokenAdd: Int {
     fn broken_add<T>(&self, rhs: T) -> Self {
-        *self + rhs //~ ERROR expected `Self`, found `T`
+        *self + rhs //~  ERROR mismatched types
+                    //~| expected `Self`
+                    //~| found `T`
+                    //~| expected Self
+                    //~| found type parameter
     }
 }
 
diff --git a/src/test/compile-fail/typeck_type_placeholder_mismatch.rs b/src/test/compile-fail/typeck_type_placeholder_mismatch.rs
index 92740cf5082..a34be63ba6b 100644
--- a/src/test/compile-fail/typeck_type_placeholder_mismatch.rs
+++ b/src/test/compile-fail/typeck_type_placeholder_mismatch.rs
@@ -19,11 +19,19 @@ pub fn main() {
 
 fn test1() {
     let x: Foo<_> = Bar::<usize>;
-    //~^ ERROR mismatched types: expected `Foo<_>`, found `Bar<usize>`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<_>`
+    //~| found `Bar<usize>`
+    //~| expected struct `Foo`
+    //~| found struct `Bar`
     let y: Foo<usize> = x;
 }
 
 fn test2() {
     let x: Foo<_> = Bar::<usize>;
-    //~^ ERROR mismatched types: expected `Foo<_>`, found `Bar<usize>`
+    //~^ ERROR mismatched types
+    //~| expected `Foo<_>`
+    //~| found `Bar<usize>`
+    //~| expected struct `Foo`
+    //~| found struct `Bar`
 }
diff --git a/src/test/compile-fail/ufcs-explicit-self-bad.rs b/src/test/compile-fail/ufcs-explicit-self-bad.rs
index 6c323e8c1ae..cbcf31b5b7e 100644
--- a/src/test/compile-fail/ufcs-explicit-self-bad.rs
+++ b/src/test/compile-fail/ufcs-explicit-self-bad.rs
@@ -42,8 +42,15 @@ trait SomeTrait {
 impl<'a, T> SomeTrait for &'a Bar<T> {
     fn dummy1(self: &&'a Bar<T>) { }
     fn dummy2(self: &Bar<T>) {} //~ ERROR mismatched self type
-    fn dummy3(self: &&Bar<T>) {} //~ ERROR lifetime mismatch
-    //~^ ERROR lifetime mismatch
+    fn dummy3(self: &&Bar<T>) {}
+    //~^ ERROR mismatched types
+    //~| expected `&'a Bar<T>`
+    //~| found `&Bar<T>`
+    //~| lifetime mismatch
+    //~| ERROR mismatched types
+    //~| expected `&'a Bar<T>`
+    //~| found `&Bar<T>`
+    //~| lifetime mismatch
 }
 
 fn main() {
diff --git a/src/test/compile-fail/variadic-ffi.rs b/src/test/compile-fail/variadic-ffi.rs
index 702702990c2..86271f670ce 100644
--- a/src/test/compile-fail/variadic-ffi.rs
+++ b/src/test/compile-fail/variadic-ffi.rs
@@ -24,14 +24,18 @@ fn main() {
         foo(1); //~ ERROR: this function takes at least 2 parameters but 1 parameter was supplied
 
         let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
-        //~^ ERROR: mismatched types: expected `unsafe extern "C" fn(isize, u8)`
-        //         , found `unsafe extern "C" fn(isize, u8, ...)`
-        //          (expected non-variadic fn, found variadic function)
+        //~^ ERROR: mismatched types
+        //~| expected `unsafe extern "C" fn(isize, u8)`
+        //~| found `unsafe extern "C" fn(isize, u8, ...)`
+        //~| expected non-variadic fn
+        //~| found variadic function
 
         let y: unsafe extern "C" fn(f: isize, x: u8, ...) = bar;
-        //~^ ERROR: mismatched types: expected `unsafe extern "C" fn(isize, u8, ...)`
-        //         , found `extern "C" extern fn(isize, u8)`
-        //          (expected variadic fn, found non-variadic function)
+        //~^ ERROR: mismatched types
+        //~| expected `unsafe extern "C" fn(isize, u8, ...)`
+        //~| found `extern "C" fn(isize, u8) {bar}`
+        //~| expected variadic fn
+        //~| found non-variadic function
 
         foo(1, 2, 3f32); //~ ERROR: can't pass an f32 to variadic function, cast to c_double
         foo(1, 2, true); //~ ERROR: can't pass bool to variadic function, cast to c_int
diff --git a/src/test/compile-fail/wrong-mul-method-signature.rs b/src/test/compile-fail/wrong-mul-method-signature.rs
index e6fbcf2d38f..21c249c0e1f 100644
--- a/src/test/compile-fail/wrong-mul-method-signature.rs
+++ b/src/test/compile-fail/wrong-mul-method-signature.rs
@@ -24,7 +24,7 @@ impl Mul<f64> for Vec1 {
     type Output = Vec1;
 
     fn mul(self, s: &f64) -> Vec1 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected f64, found &-ptr
+    //~^ ERROR method `mul` has an incompatible type for trait
         Vec1 {
             x: self.x * *s
         }
@@ -41,7 +41,7 @@ impl Mul<Vec2> for Vec2 {
     type Output = f64;
 
     fn mul(self, s: f64) -> Vec2 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected struct Vec2, found f64
+    //~^ ERROR method `mul` has an incompatible type for trait
         Vec2 {
             x: self.x * s,
             y: self.y * s
@@ -60,7 +60,7 @@ impl Mul<f64> for Vec3 {
     type Output = i32;
 
     fn mul(self, s: f64) -> f64 {
-    //~^ ERROR: method `mul` has an incompatible type for trait: expected i32, found f64
+    //~^ ERROR method `mul` has an incompatible type for trait
         s
     }
 }
@@ -72,7 +72,15 @@ pub fn main() {
 
     let x: Vec2 = Vec2 { x: 1.0, y: 2.0 } * 2.0; // trait had reversed order
     //~^ ERROR mismatched types
-    //~^^ ERROR mismatched types
+    //~| expected `Vec2`
+    //~| found `_`
+    //~| expected struct `Vec2`
+    //~| found floating-point variable
+    //~| ERROR mismatched types
+    //~| expected `Vec2`
+    //~| found `f64`
+    //~| expected struct `Vec2`
+    //~| found f64
 
     let x: i32 = Vec3 { x: 1.0, y: 2.0, z: 3.0 } * 2.0;
 }