]> git.lizzy.rs Git - rust.git/commitdiff
update test cases to reflect new messages
authorNiko Matsakis <niko@alum.mit.edu>
Wed, 20 Apr 2016 18:42:13 +0000 (14:42 -0400)
committerNiko Matsakis <niko@alum.mit.edu>
Mon, 2 May 2016 15:47:10 +0000 (11:47 -0400)
121 files changed:
src/test/compile-fail/array-not-vector.rs
src/test/compile-fail/associated-types-eq-3.rs
src/test/compile-fail/associated-types-path-2.rs
src/test/compile-fail/augmented-assignments.rs
src/test/compile-fail/bad-const-type.rs
src/test/compile-fail/bad-main.rs
src/test/compile-fail/binop-move-semantics.rs
src/test/compile-fail/block-must-not-have-result-while.rs
src/test/compile-fail/borrowck/borrowck-box-insensitivity.rs
src/test/compile-fail/borrowck/borrowck-closures-mut-of-imm.rs
src/test/compile-fail/borrowck/borrowck-closures-unique.rs
src/test/compile-fail/borrowck/borrowck-lend-flow-loop.rs
src/test/compile-fail/borrowck/borrowck-mut-borrow-linear-errors.rs
src/test/compile-fail/borrowck/borrowck-report-with-custom-diagnostic.rs
src/test/compile-fail/closure-wrong-kind.rs
src/test/compile-fail/coerce-mut.rs
src/test/compile-fail/coercion-slice.rs
src/test/compile-fail/cross-borrow-trait.rs
src/test/compile-fail/default_ty_param_conflict.rs
src/test/compile-fail/default_ty_param_conflict_cross_crate.rs
src/test/compile-fail/destructure-trait-ref.rs
src/test/compile-fail/dst-bad-assign.rs
src/test/compile-fail/dst-bad-coerce4.rs
src/test/compile-fail/explicit-self-lifetime-mismatch.rs
src/test/compile-fail/extern-main-fn.rs
src/test/compile-fail/fn-item-type.rs
src/test/compile-fail/fn-trait-formatting.rs
src/test/compile-fail/fully-qualified-type-name1.rs
src/test/compile-fail/fully-qualified-type-name2.rs
src/test/compile-fail/fully-qualified-type-name4.rs
src/test/compile-fail/generic-type-params-name-repr.rs
src/test/compile-fail/if-branch-types.rs
src/test/compile-fail/if-let-arm-types.rs
src/test/compile-fail/if-without-else-result.rs
src/test/compile-fail/integer-literal-suffix-inference.rs
src/test/compile-fail/integral-variable-unification-error.rs
src/test/compile-fail/issue-10176.rs
src/test/compile-fail/issue-11319.rs
src/test/compile-fail/issue-12997-2.rs
src/test/compile-fail/issue-13359.rs
src/test/compile-fail/issue-13466.rs
src/test/compile-fail/issue-13482-2.rs
src/test/compile-fail/issue-13482.rs
src/test/compile-fail/issue-13624.rs
src/test/compile-fail/issue-14091.rs
src/test/compile-fail/issue-14541.rs
src/test/compile-fail/issue-15783.rs
src/test/compile-fail/issue-15896.rs
src/test/compile-fail/issue-16338.rs
src/test/compile-fail/issue-16401.rs
src/test/compile-fail/issue-17033.rs
src/test/compile-fail/issue-17263.rs
src/test/compile-fail/issue-17283.rs
src/test/compile-fail/issue-17728.rs
src/test/compile-fail/issue-17740.rs
src/test/compile-fail/issue-19109.rs
src/test/compile-fail/issue-19991.rs
src/test/compile-fail/issue-24036.rs
src/test/compile-fail/issue-24357.rs
src/test/compile-fail/issue-24446.rs
src/test/compile-fail/issue-26480.rs
src/test/compile-fail/issue-27008.rs
src/test/compile-fail/issue-29084.rs
src/test/compile-fail/issue-2951.rs
src/test/compile-fail/issue-3477.rs
src/test/compile-fail/issue-3680.rs
src/test/compile-fail/issue-4201.rs
src/test/compile-fail/issue-4517.rs
src/test/compile-fail/issue-4968.rs
src/test/compile-fail/issue-5100.rs
src/test/compile-fail/issue-5358-1.rs
src/test/compile-fail/issue-5500.rs
src/test/compile-fail/issue-7061.rs
src/test/compile-fail/issue-7092.rs
src/test/compile-fail/issue-7867.rs
src/test/compile-fail/issue-9575.rs
src/test/compile-fail/main-wrong-type-2.rs
src/test/compile-fail/main-wrong-type.rs
src/test/compile-fail/match-range-fail.rs
src/test/compile-fail/match-struct.rs
src/test/compile-fail/match-vec-mismatch-2.rs
src/test/compile-fail/method-self-arg-1.rs
src/test/compile-fail/moves-based-on-type-distribute-copy-over-paren.rs
src/test/compile-fail/moves-based-on-type-match-bindings.rs
src/test/compile-fail/mut-pattern-mismatched.rs
src/test/compile-fail/noexporttypeexe.rs
src/test/compile-fail/occurs-check-2.rs
src/test/compile-fail/occurs-check.rs
src/test/compile-fail/pattern-error-continue.rs
src/test/compile-fail/pptypedef.rs
src/test/compile-fail/ptr-coercion.rs
src/test/compile-fail/ref-suggestion.rs
src/test/compile-fail/regions-bounds.rs
src/test/compile-fail/regions-early-bound-error-method.rs
src/test/compile-fail/regions-fn-subtyping-return-static.rs
src/test/compile-fail/regions-infer-not-param.rs
src/test/compile-fail/regions-infer-paramd-indirect.rs
src/test/compile-fail/reject-specialized-drops-8142.rs
src/test/compile-fail/repeat_count.rs
src/test/compile-fail/shift-various-bad-types.rs
src/test/compile-fail/slice-mut.rs
src/test/compile-fail/slightly-nice-generic-literal-messages.rs
src/test/compile-fail/struct-base-wrong-type-2.rs
src/test/compile-fail/struct-base-wrong-type.rs
src/test/compile-fail/structure-constructor-type-mismatch.rs
src/test/compile-fail/substs-ppaux.rs
src/test/compile-fail/suppressed-error.rs
src/test/compile-fail/tag-that-dare-not-speak-its-name.rs
src/test/compile-fail/terr-in-field.rs
src/test/compile-fail/terr-sorts.rs
src/test/compile-fail/token-error-correct-3.rs
src/test/compile-fail/trait-bounds-cant-coerce.rs
src/test/compile-fail/tuple-arity-mismatch.rs
src/test/compile-fail/tutorial-suffix-inference-test.rs
src/test/compile-fail/type-mismatch-multiple.rs
src/test/compile-fail/type-mismatch-same-crate-name.rs
src/test/compile-fail/type-parameter-names.rs
src/test/compile-fail/type-params-in-different-spaces-1.rs
src/test/compile-fail/typeck_type_placeholder_mismatch.rs
src/test/compile-fail/ufcs-explicit-self-bad.rs
src/test/compile-fail/variadic-ffi-3.rs

index 6c9b8f81b2faf6779cb23a297d3f778d59db929a..1bbccae53a44d6f755804790fe9d8b787025028f 100644 (file)
 fn main() {
     let _x: i32 = [1, 2, 3];
     //~^ ERROR mismatched types
-    //~| expected `i32`
-    //~| found `[_; 3]`
-    //~| expected i32
-    //~| found array of 3 elements
+    //~| expected type `i32`
+    //~| found type `[_; 3]`
+    //~| expected i32, found array of 3 elements
 
     let x: &[i32] = &[1, 2, 3];
     let _y: &i32 = x;
     //~^ ERROR mismatched types
-    //~| expected `&i32`
-    //~| found `&[i32]`
-    //~| expected i32
-    //~| found slice
+    //~| expected type `&i32`
+    //~| found type `&[i32]`
+    //~| expected i32, found slice
 }
index f01f2b111c5c15c6d261e2fd4cdacfe8a6216ef1..8c66160e8a36f723c0a16c017d2956a83814f8fe 100644 (file)
@@ -32,10 +32,9 @@ fn foo1<I: Foo<A=Bar>>(x: I) {
 fn foo2<I: Foo>(x: I) {
     let _: Bar = x.boo();
     //~^ ERROR mismatched types
-    //~| expected `Bar`
-    //~| found `<I as Foo>::A`
-    //~| expected struct `Bar`
-    //~| found associated type
+    //~| expected type `Bar`
+    //~| found type `<I as Foo>::A`
+    //~| expected struct `Bar`, found associated type
 }
 
 
index 68fba56427cc50f59617b761f90cee277945f71f..cdb7dff692c146dd6fb762c4c1cdcba8b970946b 100644 (file)
@@ -28,8 +28,7 @@ pub fn f2<T: Foo>(a: T) -> T::A {
 pub fn f1_int_int() {
     f1(2i32, 4i32);
     //~^ ERROR mismatched types
-    //~| expected `u32`
-    //~| found `i32`
+    //~| expected u32, found i32
 }
 
 pub fn f1_int_uint() {
@@ -49,8 +48,7 @@ pub fn f1_uint_int() {
 pub fn f2_int() {
     let _: i32 = f2(2i32);
     //~^ ERROR mismatched types
-    //~| expected `i32`
-    //~| found `u32`
+    //~| expected i32, found u32
 }
 
 pub fn main() { }
index 221015d5120622bf964cf8a4fe953ee1391c9fa2..8ac6b419295ee851fb838b30801c06f3d4b0b4db 100644 (file)
@@ -21,8 +21,10 @@ fn add_assign(&mut self, _: Int) {
 fn main() {
     let mut x = Int(1);
     x   //~ error: use of moved value: `x`
+    //~^ value used here after move
+    //~| note: move occurs because `x` has type `Int`
     +=
-    x;  //~ note: `x` moved here because it has type `Int`, which is non-copyable
+    x;  //~ value moved here
 
     let y = Int(2);
     y   //~ error: cannot borrow immutable local variable `y` as mutable
index f05c8c31f10245edf5f8bf68d59e14fa8e72ce3b..ee6ac33072792a722202d7a1b82f7bbbcad19f6b 100644 (file)
@@ -10,8 +10,7 @@
 
 static i: String = 10;
 //~^ ERROR mismatched types
-//~| expected `std::string::String`
-//~| found `_`
-//~| expected struct `std::string::String`
-//~| found integral variable
+//~| expected type `std::string::String`
+//~| found type `_`
+//~| expected struct `std::string::String`, found integral variable
 fn main() { println!("{}", i); }
index 321dca8989134f92391abda79aa2b74fc11c4f14..1253f7569e7e8e48ec2f9e315838d05b5c6940fa 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-fn main(x: isize) { } //~ ERROR: main function expects type
+fn main(x: isize) { } //~ ERROR: main function has wrong type
index cff0064497aff34ac814b8be55d4a1b9c4e64b9d..0cc6ea3e984d95c9f2c4e365608b0917c9ad5755 100644 (file)
@@ -62,6 +62,7 @@ fn mut_plus_immut() {
     &mut f
     +
     &f;  //~ ERROR: cannot borrow `f` as immutable because it is also borrowed as mutable
+    //~^ cannot borrow `f` as immutable because it is also borrowed as mutable
 }
 
 fn immut_plus_mut() {
@@ -70,6 +71,7 @@ fn immut_plus_mut() {
     &f
     +
     &mut f;  //~ ERROR: cannot borrow `f` as mutable because it is also borrowed as immutable
+    //~^ cannot borrow `f` as mutable because it is also borrowed as immutable
 }
 
 fn main() {}
index ba6340ed395ee934f278d45d66bb7e64ef13e482..a0fb470e1e4d0f1887a13e7b9967184102455dc2 100644 (file)
@@ -11,9 +11,8 @@
 fn main() {
     while true {
         true //~  ERROR mismatched types
-             //~| expected `()`
-             //~| found `bool`
-             //~| expected ()
-             //~| found bool
+             //~| expected type `()`
+             //~| found type `bool`
+             //~| expected (), found bool
     }
 }
index 7c3d632078fe24f23b39aa4979519e4877b2fda4..bde3212c5bc6301536b036d27e790910d6f2d359 100644 (file)
@@ -33,22 +33,28 @@ struct D {
 fn copy_after_move() {
     let a: Box<_> = box A { x: box 0, y: 1 };
     let _x = a.x;
+    //~^ value moved here
     let _y = a.y; //~ ERROR use of moved
-    //~^^ NOTE `a` moved here (through moving `a.x`)
+    //~^ move occurs because `a.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn move_after_move() {
     let a: Box<_> = box B { x: box 0, y: box 1 };
     let _x = a.x;
+    //~^ value moved here
     let _y = a.y; //~ ERROR use of moved
-    //~^^ NOTE `a` moved here (through moving `a.x`)
+    //~^ move occurs because `a.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn borrow_after_move() {
     let a: Box<_> = box A { x: box 0, y: 1 };
     let _x = a.x;
+    //~^ value moved here
     let _y = &a.y; //~ ERROR use of moved
-    //~^^ NOTE `a` moved here (through moving `a.x`)
+    //~^ move occurs because `a.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn move_after_borrow() {
@@ -75,44 +81,52 @@ fn move_after_mut_borrow() {
 fn borrow_after_mut_borrow() {
     let mut a: Box<_> = box A { x: box 0, y: 1 };
     let _x = &mut a.x;
-    //~^ NOTE previous borrow of `a` occurs here (through borrowing `a.x`);
+    //~^ NOTE mutable borrow occurs here (via `a.x`)
     let _y = &a.y; //~ ERROR cannot borrow
+    //~^ immutable borrow occurs here (via `a.y`)
 }
-//~^ NOTE previous borrow ends here
+//~^ NOTE mutable borrow ends here
 
 fn mut_borrow_after_borrow() {
     let mut a: Box<_> = box A { x: box 0, y: 1 };
     let _x = &a.x;
-    //~^ NOTE previous borrow of `a` occurs here (through borrowing `a.x`)
+    //~^ NOTE immutable borrow occurs here (via `a.x`)
     let _y = &mut a.y; //~ ERROR cannot borrow
+    //~^ mutable borrow occurs here (via `a.y`)
 }
-//~^ NOTE previous borrow ends here
+//~^ NOTE immutable borrow ends here
 
 fn copy_after_move_nested() {
     let a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 };
     let _x = a.x.x;
-    //~^ NOTE `a.x.x` moved here because it has type `Box<isize>`, which is moved by default
+    //~^ value moved here
     let _y = a.y; //~ ERROR use of collaterally moved
+    //~^ NOTE move occurs because `a.x.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn move_after_move_nested() {
     let a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 };
     let _x = a.x.x;
-    //~^ NOTE `a.x.x` moved here because it has type `Box<isize>`, which is moved by default
+    //~^ value moved here
     let _y = a.y; //~ ERROR use of collaterally moved
+    //~^ NOTE move occurs because `a.x.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn borrow_after_move_nested() {
     let a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 };
     let _x = a.x.x;
-    //~^ NOTE `a.x.x` moved here because it has type `Box<isize>`, which is moved by default
+    //~^ value moved here
     let _y = &a.y; //~ ERROR use of collaterally moved
+    //~^ NOTE move occurs because `a.x.x` has type `Box<isize>`
+    //~| value used here after move
 }
 
 fn move_after_borrow_nested() {
     let a: Box<_> = box D { x: box A { x: box 0, y: 1 }, y: box 2 };
     let _x = &a.x.x;
-    //~^ NOTE borrow of `a.x.x` occurs here
+    //~^ borrow of `a.x.x` occurs here
     let _y = a.y; //~ ERROR cannot move
 }
 
@@ -133,18 +147,20 @@ fn move_after_mut_borrow_nested() {
 fn borrow_after_mut_borrow_nested() {
     let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 };
     let _x = &mut a.x.x;
-    //~^ NOTE previous borrow of `a.x.x` occurs here; the mutable borrow prevents
+    //~^ mutable borrow occurs here
     let _y = &a.y; //~ ERROR cannot borrow
+    //~^ immutable borrow occurs here
 }
-//~^ NOTE previous borrow ends here
+//~^ NOTE mutable borrow ends here
 
 fn mut_borrow_after_borrow_nested() {
     let mut a: Box<_> = box C { x: box A { x: box 0, y: 1 }, y: 2 };
     let _x = &a.x.x;
-    //~^ NOTE previous borrow of `a.x.x` occurs here; the immutable borrow prevents
+    //~^ immutable borrow occurs here
     let _y = &mut a.y; //~ ERROR cannot borrow
+    //~^ mutable borrow occurs here
 }
-//~^ NOTE previous borrow ends here
+//~^ NOTE immutable borrow ends here
 
 fn main() {
     copy_after_move();
index 40f9be2dd8230fcb82f80831b698013c703c4db5..dc2f0e8395f08154172853662d3d83f97d12ac09 100644 (file)
@@ -24,7 +24,7 @@ fn a(x: &isize) {
     //~^ ERROR cannot borrow
     let c2 = || set(&mut *x);
     //~^ ERROR cannot borrow
-    //~| ERROR closure requires unique access
+    //~| ERROR two closures require unique access to `x` at the same time
 }
 
 fn main() {
index 3646a68f06fd745ed09fb0f41df2a2c971339559..1b22dc4d2c6af585c7a7f3b608efb650a475b24d 100644 (file)
@@ -39,7 +39,7 @@ fn c(x: &mut isize) {
 
 fn d(x: &mut isize) {
     let c1 = || set(x);
-    let c2 = || set(x); //~ ERROR closure requires unique access to `x`
+    let c2 = || set(x); //~ ERROR two closures require unique access to `x` at the same time
 }
 
 fn e(x: &mut isize) {
index f09e7ffd7e4b791c4b51472ca9db8013b79e0659..56cbe0b1878675314087ea02137e368721b1448a 100644 (file)
@@ -109,6 +109,7 @@ fn while_aliased_mut_cond(cond: bool, cond2: bool) {
         borrow(&*v); //~ ERROR cannot borrow
         if cond2 {
             x = &mut v; //~ ERROR cannot borrow
+            //~^ ERROR cannot borrow
         }
     }
 }
index 38e0e27a7b98e792e828f44bb7ad64ec83f426a0..f789d44016eb177850ec2dd3cf35b6ae421c3b11 100644 (file)
@@ -19,6 +19,7 @@ fn main() {
         match 1 {
             1 => { addr = &mut x; }
             //~^ ERROR cannot borrow `x` as mutable more than once at a time
+            //~| ERROR cannot borrow `x` as mutable more than once at a time
             2 => { addr = &mut x; }
             //~^ ERROR cannot borrow `x` as mutable more than once at a time
             _ => { addr = &mut x; }
index 2b1ff47ee3d94c3e8312fc2f141d0f846a69595f..3ca8cc431e0983ce8f5a9365420ae7b3f7d45f02 100644 (file)
@@ -13,10 +13,11 @@ fn main() {
     // Original borrow ends at end of function
     let mut x = 1;
     let y = &mut x;
-    //~^ previous borrow of `x` occurs here; the mutable borrow prevents
+    //~^ mutable borrow occurs here
     let z = &x; //~ ERROR cannot borrow
+    //~^ immutable borrow occurs here
 }
-//~^ NOTE previous borrow ends here
+//~^ NOTE mutable borrow ends here
 
 fn foo() {
     match true {
@@ -24,10 +25,11 @@ fn foo() {
             // Original borrow ends at end of match arm
             let mut x = 1;
             let y = &x;
-            //~^ previous borrow of `x` occurs here; the immutable borrow prevents
+            //~^ immutable borrow occurs here
             let z = &mut x; //~ ERROR cannot borrow
+            //~^ mutable borrow occurs here
         }
-     //~^ NOTE previous borrow ends here
+     //~^ NOTE immutable borrow ends here
         false => ()
     }
 }
@@ -37,8 +39,9 @@ fn bar() {
     || {
         let mut x = 1;
         let y = &mut x;
-        //~^ previous borrow of `x` occurs here; the mutable borrow prevents
+        //~^ first mutable borrow occurs here
         let z = &mut x; //~ ERROR cannot borrow
+        //~^ second mutable borrow occurs here
     };
- //~^ NOTE previous borrow ends here
+ //~^ NOTE first borrow ends here
 }
index 6792414c367906c9df2493931ad96f33164b16c8..a387e4c5ece11467527a39ad57b4a9d7eb1a5db6 100644 (file)
@@ -17,6 +17,6 @@ fn bar<T: Fn(u32)>(_: T) {}
 
 fn main() {
     let x = X;
-    let closure = |_| foo(x);  //~ ERROR E0524
+    let closure = |_| foo(x);  //~ ERROR E0525
     bar(closure);
 }
index 30c1b66a7b81fdc102f078dde566d1d7d9c59563..634d12441a12077c73bf3c5b62f63ff126d4d21b 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     let x = 0;
     f(&x);
     //~^ ERROR mismatched types
-    //~| expected `&mut i32`
-    //~| found `&_`
+    //~| expected type `&mut i32`
+    //~| found type `&_`
     //~| values differ in mutability
 }
index bb4d1693af7e35902839a9d920b85b4b7f5af701..bd7e6c2a2131d36d0eb104be0864caabe72b9c40 100644 (file)
@@ -13,8 +13,7 @@
 fn main() {
     let _: &[i32] = [0];
     //~^ ERROR mismatched types
-    //~| expected `&[i32]`
-    //~| found `[_; 1]`
-    //~| expected &-ptr
-    //~| found array of 1 elements
+    //~| expected type `&[i32]`
+    //~| found type `[_; 1]`
+    //~| expected &-ptr, found array of 1 elements
 }
index d60fb1d5d19669651b8ab45804a84efcd1196f56..ea9a29c0e2ae5e9aaf1080fc10427e9e37a7dce6 100644 (file)
@@ -19,8 +19,7 @@ pub fn main() {
     // FIXME (#22405): Replace `Box::new` with `box` here when/if possible.
     let x: Box<Trait> = Box::new(Foo);
     let _y: &Trait = x; //~  ERROR mismatched types
-                        //~| expected `&Trait`
-                        //~| found `Box<Trait>`
-                        //~| expected &-ptr
-                        //~| found box
+                        //~| expected type `&Trait`
+                        //~| found type `Box<Trait>`
+                        //~| expected &-ptr, found box
 }
index 48c5cd1ff7706995256927d057080c7ac974e984..4702b504f157d9e4ad6c2745c6d53ffd6b792ee3 100644 (file)
@@ -23,6 +23,9 @@ fn main() {
     // Here, F is instantiated with $0=uint
     let x = foo();
     //~^ ERROR: mismatched types
+    //~| expected type `usize`
+    //~| found type `isize`
+    //~| NOTE: conflicting type parameter defaults `usize` and `isize`
     //~| NOTE: conflicting type parameter defaults `usize` and `isize`
     //~| NOTE: ...that was applied to an unconstrained type variable here
 
index fc2c49d65affec7d5c67006a2848e501206e5ce2..b608c6c99be89a5754760dde87272bb94ac54945 100644 (file)
@@ -24,7 +24,11 @@ fn main() {
     //~^ NOTE: ...that also applies to the same type variable here
 
     meh(foo);
-    //~^ ERROR: mismatched types:
+    //~^ ERROR: mismatched types
     //~| NOTE: conflicting type parameter defaults `bool` and `char`
+    //~| NOTE: conflicting type parameter defaults `bool` and `char`
+    //~| a second default is defined on `default_param_test::bleh`
     //~| NOTE:  ...that was applied to an unconstrained type variable here
+    //~| expected type `bool`
+    //~| found type `char`
 }
index 68d9795710245f7aa66b43e96298f35d6bbfa786..d0a31fbce91ed38475c42f7a1b1c23c20eaafac3 100644 (file)
@@ -40,20 +40,17 @@ fn main() {
     // n > m
     let &&x = &1isize as &T;
     //~^ ERROR mismatched types
-    //~| expected `T`
-    //~| found `&_`
-    //~| expected trait T
-    //~| found &-ptr
+    //~| expected type `T`
+    //~| found type `&_`
+    //~| expected trait T, found &-ptr
     let &&&x = &(&1isize as &T);
     //~^ ERROR mismatched types
-    //~| expected `T`
-    //~| found `&_`
-    //~| expected trait T
-    //~| found &-ptr
+    //~| expected type `T`
+    //~| found type `&_`
+    //~| expected trait T, found &-ptr
     let box box x = box 1isize as Box<T>;
     //~^ ERROR mismatched types
-    //~| expected `T`
-    //~| found `Box<_>`
-    //~| expected trait T
-    //~| found box
+    //~| expected type `T`
+    //~| found type `Box<_>`
+    //~| expected trait T, found box
 }
index 2d21d0ebc760b5579e6c47aa501b2f2b6257d01f..9e71ad2417792801b1eb88c5efe44ddb4abfcb81 100644 (file)
@@ -45,9 +45,8 @@ pub fn main() {
     let z: Box<ToBar> = Box::new(Bar1 {f: 36});
     f5.ptr = Bar1 {f: 36};
     //~^ ERROR mismatched types
-    //~| expected `ToBar`
-    //~| found `Bar1`
-    //~| expected trait ToBar
-    //~| found struct `Bar1`
+    //~| expected type `ToBar`
+    //~| found type `Bar1`
+    //~| expected trait ToBar, found struct `Bar1`
     //~| ERROR `ToBar: std::marker::Sized` is not satisfied
 }
index c1443bdbb309d691375d26c384d7e5b04a2d3c0a..9d4d56cf79190a78b12d9852d89c287bcbe8d21a 100644 (file)
@@ -19,8 +19,7 @@ pub fn main() {
     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]>`
-    //~| expected array of 3 elements
-    //~| found slice
+    //~| expected type `&Fat<[isize; 3]>`
+    //~| found type `&Fat<[isize]>`
+    //~| expected array of 3 elements, found slice
 }
index 922e58698dd754e273fcec3315230b7c21ac29e1..b5432fafb1b855f0b09cb6a1a2634b847673acc8 100644 (file)
@@ -16,12 +16,12 @@ 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>`
+    //~| expected type `Foo<'a, 'b>`
+    //~| found type `Foo<'b, 'a>`
     //~| lifetime mismatch
     //~| ERROR mismatched types
-    //~| expected `Foo<'a, 'b>`
-    //~| found `Foo<'b, 'a>`
+    //~| expected type `Foo<'a, 'b>`
+    //~| found type `Foo<'b, 'a>`
     //~| lifetime mismatch
 }
 
index 05ce3eefda86c322156f14f1ce78c8330ef55d67..11f299acefa874e55b5efa49b81eb345fd9350be 100644 (file)
@@ -8,4 +8,4 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-extern fn main() {} //~ ERROR: main function expects type
+extern fn main() {} //~ ERROR: main function has wrong type
index c90a7113f1b4106d3d7d210195f6867e6cd560d9..6217a9f16b93523d868139299feddf0716e556a1 100644 (file)
@@ -22,26 +22,22 @@ impl<T> Foo for T { /* `foo` is still default here */ }
 fn main() {
     eq(foo::<u8>, bar::<u8>);
     //~^ ERROR mismatched types
-    //~|  expected `fn(isize) -> isize {foo::<u8>}`
-    //~|  found `fn(isize) -> isize {bar::<u8>}`
-    //~|  expected fn item
-    //~|  found a different fn item
+    //~|  expected type `fn(isize) -> isize {foo::<u8>}`
+    //~|  found type `fn(isize) -> isize {bar::<u8>}`
+    //~|  expected fn item, found a different fn item
 
     eq(foo::<u8>, foo::<i8>);
     //~^ ERROR mismatched types
-    //~|  expected `fn(isize) -> isize {foo::<u8>}`
-    //~|  found `fn(isize) -> isize {foo::<i8>}`
+    //~| expected u8, found i8
 
     eq(bar::<String>, bar::<Vec<u8>>);
     //~^ ERROR mismatched types
-    //~|  expected `fn(isize) -> isize {bar::<std::string::String>}`
-    //~|  found `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
-    //~|  expected struct `std::string::String`
-    //~|  found struct `std::vec::Vec`
+    //~|  expected type `fn(isize) -> isize {bar::<std::string::String>}`
+    //~|  found type `fn(isize) -> isize {bar::<std::vec::Vec<u8>>}`
+    //~|  expected struct `std::string::String`, found struct `std::vec::Vec`
 
     // Make sure we distinguish between trait methods correctly.
     eq(<u8 as Foo>::foo, <u16 as Foo>::foo);
     //~^ ERROR mismatched types
-    //~|  expected `fn() {<u8 as Foo>::foo}`
-    //~|  found `fn() {<u16 as Foo>::foo}`
+    //~| expected u8, found u16
 }
index 8cbfc520ff449cc32cdf3933389d7719613d7554..fd140cd1d391a6bf1ca7105bb94cabfbe87a10dd 100644 (file)
@@ -16,22 +16,19 @@ fn needs_fn<F>(x: F) where F: Fn(isize) -> isize {}
 fn main() {
     let _: () = (box |_: isize| {}) as Box<FnOnce(isize)>;
     //~^ ERROR mismatched types
-    //~| expected `()`
-    //~| found `Box<std::ops::FnOnce(isize)>`
-    //~| expected ()
-    //~| found box
+    //~| expected type `()`
+    //~| found type `Box<std::ops::FnOnce(isize)>`
+    //~| expected (), found box
     let _: () = (box |_: isize, isize| {}) as Box<Fn(isize, isize)>;
     //~^ ERROR mismatched types
-    //~| expected `()`
-    //~| found `Box<std::ops::Fn(isize, isize)>`
-    //~| expected ()
-    //~| found box
+    //~| expected type `()`
+    //~| found type `Box<std::ops::Fn(isize, isize)>`
+    //~| expected (), found box
     let _: () = (box || -> isize { unimplemented!() }) as Box<FnMut() -> isize>;
     //~^ ERROR mismatched types
-    //~| expected `()`
-    //~| found `Box<std::ops::FnMut() -> isize>`
-    //~| expected ()
-    //~| found box
+    //~| expected type `()`
+    //~| found type `Box<std::ops::FnMut() -> isize>`
+    //~| expected (), found box
 
     needs_fn(1);
     //~^ ERROR : std::ops::Fn<(isize,)>`
index fb787e8572c200018f97d5f36c2d9bcefc96dfb9..5ea8ce226443836889e06866c287577af8a95f3a 100644 (file)
@@ -14,8 +14,7 @@ fn main() {
     let x: Option<usize>;
     x = 5;
     //~^ ERROR mismatched types
-    //~| expected `std::option::Option<usize>`
-    //~| found `_`
-    //~| expected enum `std::option::Option`
-    //~| found integral variable
+    //~| expected type `std::option::Option<usize>`
+    //~| found type `_`
+    //~| expected enum `std::option::Option`, found integral variable
 }
index ab542d90800b24d85f6804565fd89767278a3a39..9ba8a11d536bede788c8f3d9a4ec2bf6e60c9224 100644 (file)
@@ -21,10 +21,9 @@ pub enum foo { }
 fn bar(x: x::foo) -> y::foo {
     return x;
     //~^ ERROR mismatched types
-    //~| expected `y::foo`
-    //~| found `x::foo`
-    //~| expected enum `y::foo`
-    //~| found enum `x::foo`
+    //~| expected type `y::foo`
+    //~| found type `x::foo`
+    //~| expected enum `y::foo`, found enum `x::foo`
 }
 
 fn main() {
index 9242849efc746b00c1846660c5bca825dc7a189e..3c8fde751f123cec50b3b59d6829dd0a9d41e97d 100644 (file)
 fn bar(x: usize) -> Option<usize> {
     return x;
     //~^ ERROR mismatched types
-    //~| expected `std::option::Option<usize>`
-    //~| found `usize`
-    //~| expected enum `std::option::Option`
-    //~| found usize
+    //~| expected type `std::option::Option<usize>`
+    //~| found type `usize`
+    //~| expected enum `std::option::Option`, found usize
 }
 
 fn main() {
index adf9a98a05c2d5dc32f8e71d303dac9b403cc47e..71d7cf792e4754d3b19397808b99c16fa655b6be 100644 (file)
@@ -22,46 +22,40 @@ fn main() {
     // Ensure that the printed type doesn't include the default type params...
     let _: Foo<isize> = ();
     //~^ ERROR mismatched types
-    //~| expected `Foo<isize>`
-    //~| found `()`
-    //~| expected struct `Foo`
-    //~| found ()
+    //~| expected type `Foo<isize>`
+    //~| found type `()`
+    //~| 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 `()`
-    //~| expected struct `Foo`
-    //~| found ()
+    //~| expected type `Foo<isize>`
+    //~| found type `()`
+    //~| expected struct `Foo`, found ()
 
     // Including cases where the default is using previous type params.
     let _: HashMap<String, isize> = ();
     //~^ ERROR mismatched types
-    //~| expected `HashMap<std::string::String, isize>`
-    //~| found `()`
-    //~| expected struct `HashMap`
-    //~| found ()
+    //~| expected type `HashMap<std::string::String, isize>`
+    //~| found type `()`
+    //~| expected struct `HashMap`, found ()
     let _: HashMap<String, isize, Hash<String>> = ();
     //~^ ERROR mismatched types
-    //~| expected `HashMap<std::string::String, isize>`
-    //~| found `()`
-    //~| expected struct `HashMap`
-    //~| found ()
+    //~| expected type `HashMap<std::string::String, isize>`
+    //~| found type `()`
+    //~| 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 `()`
-    //~| expected struct `Foo`
-    //~| found ()
+    //~| expected type `Foo<A, isize>`
+    //~| found type `()`
+    //~| 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 `()`
-    //~| expected struct `Foo`
-    //~| found ()
+    //~| expected type `Foo`
+    //~| found type `()`
+    //~| expected struct `Foo`, found ()
 }
index 2c730531b823a85f86d2e0cd650fd3027ef5ed89..ca9803f66b20d4e35502fa197d428d7e35409be4 100644 (file)
@@ -11,6 +11,5 @@
 fn main() {
     let x = if true { 10i32 } else { 10u32 };
     //~^ ERROR if and else have incompatible types
-    //~| expected `i32`
-    //~| found `u32`
+    //~| expected i32, found u32
 }
index d179ec015d23122175cb1b3a065f1f3efcc18db8..c7b1e1a62c2097c4e87fdcbdec210f5aa8b7f9a3 100644 (file)
@@ -10,6 +10,9 @@
 
 fn main() {
     if let Some(b) = None { //~ ERROR: `if let` arms have incompatible types
+        //~^ expected (), found integral variable
+        //~| expected type `()`
+        //~| found type `_`
         ()
     } else {                //~ NOTE: `if let` arm with an incompatible type
         1
index a9567f4272f507e97576b0818e08960b66ddef87..e8aa1f70ea1dcd85f6aa7fe6b37d9f3c404bda18 100644 (file)
@@ -11,9 +11,8 @@
 fn main() {
     let a = if true { true };
     //~^ ERROR if may be missing an else clause
-    //~| expected `()`
-    //~| found `bool`
-    //~| expected ()
-    //~| found bool
+    //~| expected type `()`
+    //~| found type `bool`
+    //~| expected (), found bool
     println!("{}", a);
 }
index a01db18a34a7fcfc4aff97615c98c3a9ad67e19d..7a850d90a87477f76ebdc3d2cc02a88be1ba0cd7 100644 (file)
@@ -41,168 +41,132 @@ fn id_u64(n: u64) -> u64 { n }
     id_i8(a8); // ok
     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`
+    //~| expected i16, found i8
     id_i16(a16); // ok
     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`
+    //~| 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`
+    //~| expected i32, found i64
 
     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`
+    //~| 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`
+    //~| expected i16, found i8
     id_i16(c16); // ok
     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`
+    //~| 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`
+    //~| expected i32, found i64
 
     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`
+    //~| 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`
+    //~| expected u16, found u8
     id_u16(b16); // ok
     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`
+    //~| 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`
+    //~| expected u32, found u64
 
     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
 }
index 3374f715917c20af3cf13ae41015c4701ffb5847..99f2d25166891b1a785f03c1e8098edf9c113d63 100644 (file)
@@ -12,8 +12,7 @@ fn main() {
     let mut x = 2;
     x = 5.0;
     //~^ ERROR mismatched types
-    //~| expected `_`
-    //~| found `_`
-    //~| expected integral variable
-    //~| found floating-point variable
+    //~| expected type `_`
+    //~| found type `_`
+    //~| expected integral variable, found floating-point variable
 }
index 6e84e777898b6d7622ae41c5df3223998a6b9991..434b795ff31f54404c489ae3491aaaf4a81d4ead 100644 (file)
 fn f() -> isize {
     (return 1, return 2)
 //~^ ERROR mismatched types
-//~| expected `isize`
-//~| found `(_, _)`
-//~| expected isize
-//~| found tuple
+//~| expected type `isize`
+//~| found type `(_, _)`
+//~| expected isize, found tuple
 }
 
 fn main() {}
index d3e44b71b1c89e44957f17783a7d7a72b089783c..8242fa1c2e9794eb8c92f61b1f81710ad910e3c4 100644 (file)
 
 fn main() {
     match Some(10) {
-    //~^ ERROR match arms have incompatible types:
-    //~| expected `bool`
-    //~| found `()`
-    //~| expected bool
-    //~| found ()
+    //~^ ERROR match arms have incompatible types
+    //~| expected type `bool`
+    //~| found type `()`
+    //~| expected bool, found ()
         Some(5) => false,
         Some(2) => true,
         None    => (), //~ NOTE match arm with an incompatible type
index 8b467c2ba11f93a475a3c19e0cee5c5d5942bbed..436d9e91dc72f2ff4935e486780a05ab47e0feae 100644 (file)
@@ -15,7 +15,6 @@
 #[bench]
 fn bar(x: isize) { }
 //~^ ERROR mismatched types
-//~| expected `fn(&mut __test::test::Bencher)`
-//~| found `fn(isize) {bar}`
-//~| expected &-ptr
-//~| found isize
+//~| expected type `fn(&mut __test::test::Bencher)`
+//~| found type `fn(isize) {bar}`
+//~| expected &-ptr, found isize
index 775412a12ca6a99c1efc68f8afa9a4f636be3b22..e33859e8c19a38479ee260f2579c00b8dd66068b 100644 (file)
@@ -15,11 +15,9 @@ fn bar(_s: u32) { }
 fn main() {
     foo(1*(1 as 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
 }
index d2c8b679ff69fff7a5818046e2cb0cd47d05fc90..17b96411603ef3e3ce6ffd4981728f34fd98e686 100644 (file)
@@ -17,16 +17,14 @@ pub fn main() {
     let _x: usize = match Some(1) {
         Ok(u) => u,
         //~^ ERROR mismatched types
-        //~| expected `std::option::Option<_>`
-        //~| found `std::result::Result<_, _>`
-        //~| expected enum `std::option::Option`
-        //~| found enum `std::result::Result`
+        //~| expected type `std::option::Option<_>`
+        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option`, found enum `std::result::Result`
 
         Err(e) => panic!(e)
         //~^ ERROR mismatched types
-        //~| expected `std::option::Option<_>`
-        //~| found `std::result::Result<_, _>`
-        //~| expected enum `std::option::Option`
-        //~| found enum `std::result::Result`
+        //~| expected type `std::option::Option<_>`
+        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option`, found enum `std::result::Result`
     };
 }
index e1fe2d06993d5ba4a21f4cddd18a3bf9713bccfa..fe03373a45d9fd6b08ab2488febec50aea53e3d5 100644 (file)
@@ -17,10 +17,9 @@ fn main() {
     let y = match x {
         [] => None,
 //~^ ERROR mismatched types
-//~| expected `[_#1i; 2]`
-//~| found `[_#7t; 0]`
-//~| expected an array with a fixed size of 2 elements
-//~| found one with 0 elements
+//~| expected type `[_#1i; 2]`
+//~| found type `[_#7t; 0]`
+//~| expected an array with a fixed size of 2 elements, found one with 0 elements
         [a,_] => Some(a)
     };
 }
index 8d98fe313349b89a59614394ce2e9f562046beac..7ed7f5898b1b7411f4b49e713b8f2203db2eb5f5 100644 (file)
@@ -15,8 +15,8 @@ fn main() {
   let y = match x {
     [] => None,
     //~^ ERROR mismatched types
-    //~| expected `[_; 2]`
-    //~| found `[_; 0]`
+    //~| expected type `[_; 2]`
+    //~| found type `[_; 0]`
     //~| expected an array with a fixed size of 2 elements
     [a,_] => Some(a)
   };
index 2a5805790a742798ab39423e239bf75b14d450a3..e4ed87c3cb0cd5baac0a663c3af4a76006e38c9f 100644 (file)
@@ -16,10 +16,9 @@ pub enum Enum {
   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`
+    //~| expected type `()`
+    //~| found type `a::Enum`
+    //~| expected (), found enum `a::Enum`
   }
 }
 
@@ -32,10 +31,9 @@ fn test_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`
+        //~| expected type `()`
+        //~| found type `a::Enum`
+        //~| expected (), found enum `a::Enum`
         }
       }
     }
index 3ceb465cb4b23c0ed59fd5313b0031e1dcb402b7..ccaeeab8b4789679da7928cd6d8968f3c3fd3e89 100644 (file)
@@ -9,9 +9,8 @@
 // except according to those terms.
 
 // error-pattern:mismatched types
-// error-pattern:expected `bool`
-// error-pattern:found `_`
-// error-pattern:expected bool
-// error-pattern:found integral variable
+// error-pattern:expected bool, found integral variable
+// error-pattern:expected type `bool`
+// error-pattern:found type `_`
 
 fn main(){assert!(1,1);}
index deb8f00cd01c9b14ff3fc422b9ba729d55698493..84c600d2201e324b378566a0e3d9e9083ecc2271 100644 (file)
@@ -14,10 +14,9 @@ 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`
+    //~| expected type `vec2`
+    //~| found type `vec3`
+    //~| expected struct `vec2`, found struct `vec3`
 }
 
 fn main() { }
index 9a139021e4c6d67dc8e2913ea304b8fd2e3a9798..37a2f1582bf08124fd4a152783a9f29c80be6623 100644 (file)
@@ -17,9 +17,8 @@ fn main() {
     let x = Some(&[name]);
     let msg = foo(x);
 //~^ ERROR mismatched types
-//~| expected `std::option::Option<&[&str]>`
-//~| found `std::option::Option<&[&str; 1]>`
-//~| expected slice
-//~| found array of 1 elements
+//~| expected type `std::option::Option<&[&str]>`
+//~| found type `std::option::Option<&[&str; 1]>`
+//~| expected slice, found array of 1 elements
     assert_eq!(msg, 3);
 }
index 7381ade263b20ebeca862abcb25878beefa7b1b9..35ef9ba2b4beacc244b90cd3e623a206241cd6ed 100644 (file)
@@ -20,10 +20,9 @@ enum E { B(R, Tau) }
         E::B(
           Tau{t: x},
           //~^ ERROR mismatched types
-          //~| expected `main::R`
-          //~| found `main::Tau`
-          //~| expected enum `main::R`
-          //~| found struct `main::Tau`
+          //~| expected type `main::R`
+          //~| found type `main::Tau`
+          //~| expected enum `main::R`, found struct `main::Tau`
           _) => x,
     };
 }
index 30775a958b57d40616cd8ce43f12b020badb7dbc..da6d081a7acb57e654e2fdadd9862246db842b2e 100644 (file)
@@ -13,8 +13,7 @@
 fn main() {
     let Slice { data: data, len: len } = "foo";
     //~^ ERROR mismatched types
-    //~| expected `&str`
-    //~| found `std::raw::Slice<_>`
-    //~| expected &-ptr
-    //~| found struct `std::raw::Slice`
+    //~| expected type `&str`
+    //~| found type `std::raw::Slice<_>`
+    //~| expected &-ptr, found struct `std::raw::Slice`
 }
index a90f9fe26e48c644f6655fa0acd7f9b17ee6b2c1..df272a71cee4f70af8daf73c6cb9475e79c76cd6 100644 (file)
@@ -14,10 +14,9 @@ fn main() {
     match () {
         Slice { data: data, len: len } => (),
         //~^ ERROR mismatched types
-        //~| expected `()`
-        //~| found `std::raw::Slice<_>`
-        //~| expected ()
-        //~| found struct `std::raw::Slice`
+        //~| expected type `()`
+        //~| found type `std::raw::Slice<_>`
+        //~| expected (), found struct `std::raw::Slice`
         _ => unreachable!()
     }
 }
index 6010e206920e5eeaa95dd537211a390b22fb3d14..f0fe01b4159706b1281474395a81a477d0be0e47 100644 (file)
 
 fn f<'r>(p: &'r mut fn(p: &mut ())) {
     (*p)(()) //~  ERROR mismatched types
-             //~| expected `&mut ()`
-             //~| found `()`
-             //~| expected &-ptr
-             //~| found ()
+             //~| expected type `&mut ()`
+             //~| found type `()`
+             //~| expected &-ptr, found ()
 }
 
 fn main() {}
index 2320bc02baf5edc478996370b1cef53008b9d1f0..063afe285fad3cb75d367c7be1eee5c4f243ac8b 100644 (file)
@@ -15,13 +15,15 @@ struct Foo { a: isize, b: isize }
 fn main() {
     let mut x: Box<_> = box Foo { a: 1, b: 2 };
     let (a, b) = (&mut x.a, &mut x.b);
-    //~^ ERROR cannot borrow `x` (here through borrowing `x.b`) as mutable more than once at a time
-    //~^^ NOTE previous borrow of `x` occurs here (through borrowing `x.a`)
+    //~^ ERROR cannot borrow `x` (via `x.b`) as mutable more than once at a time
+    //~| NOTE first mutable borrow occurs here (via `x.a`)
+    //~| NOTE second mutable borrow occurs here (via `x.b`)
 
     let mut foo: Box<_> = box Foo { a: 1, b: 2 };
     let (c, d) = (&mut foo.a, &foo.b);
-    //~^ ERROR cannot borrow `foo` (here through borrowing `foo.b`) as immutable
-    //~^^ NOTE previous borrow of `foo` occurs here (through borrowing `foo.a`)
+    //~^ ERROR cannot borrow `foo` (via `foo.b`) as immutable
+    //~| NOTE mutable borrow occurs here (via `foo.a`)
+    //~| NOTE immutable borrow occurs here (via `foo.b`)
 }
-//~^ NOTE previous borrow ends here
-//~^^ NOTE previous borrow ends here
+//~^ NOTE first borrow ends here
+//~^^ NOTE mutable borrow ends here
index c7d6443663241a27392acbc03f13f6ad8fa700fa..98208bcfdbdee1e7f0cf1556ec51a4c8c3dded62 100644 (file)
@@ -24,28 +24,25 @@ fn main() {
     // `x { ... }` should not be interpreted as a struct literal here
     if x = x {
         //~^ ERROR mismatched types
-        //~| expected `bool`
-        //~| found `()`
-        //~| expected bool
-        //~| found ()
+        //~| expected type `bool`
+        //~| found type `()`
+        //~| 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 ()
+        //~| expected type `bool`
+        //~| found type `()`
+        //~| 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 ()
+        //~| expected type `bool`
+        //~| found type `()`
+        //~| expected bool, found ()
         println!("{}", x);
     }
 }
index 787eb7a3b8878e362e49b12123d590a8fc03f608..f508d7123d88f6ce4d2b7a36eedfffc46b18a0f5 100644 (file)
@@ -108,6 +108,9 @@ fn fmt(&self, formatter: &mut Formatter) -> Result<(), Error> {
 
 fn str_to_direction(to_parse: &str) -> RoomDirection {
     match to_parse { //~ ERROR match arms have incompatible types
+    //~^ expected enum `RoomDirection`, found enum `std::option::Option`
+    //~| expected type `RoomDirection`
+    //~| found type `std::option::Option<_>`
         "w" | "west" => RoomDirection::West,
         "e" | "east" => RoomDirection::East,
         "n" | "north" => RoomDirection::North,
index 4381bf22e2acee44f667826dd86fdd94cd92725b..6b9294b2038f18fff4070765df96e8d574a31605 100644 (file)
@@ -15,12 +15,12 @@ struct Foo<'a> {
 impl <'a> Foo<'a>{
     fn bar(self: &mut Foo) {
     //~^ mismatched types
-    //~| expected `&mut Foo<'a>`
-    //~| found `&mut Foo<'_>`
+    //~| expected type `&mut Foo<'a>`
+    //~| found type `&mut Foo<'_>`
     //~| lifetime mismatch
     //~| mismatched types
-    //~| expected `&mut Foo<'a>`
-    //~| found `&mut Foo<'_>`
+    //~| expected type `&mut Foo<'a>`
+    //~| found type `&mut Foo<'_>`
     //~| lifetime mismatch
     }
 }
index 1ffffa9fc748e93e6158a4632fdf29b02940013e..580684e2e140bf3b49e5ec946dcfef0a680eac6e 100644 (file)
@@ -12,11 +12,10 @@ trait Trait { }
 
 fn function(t: &mut Trait) {
     t as *mut Trait
- //~^ ERROR: mismatched types:
- //~| expected `()`,
- //~|    found `*mut Trait`
- //~| (expected (),
- //~|    found *-ptr) [E0308]
+ //~^ ERROR: mismatched types
+ //~| NOTE: expected type `()`
+ //~| NOTE:    found type `*mut Trait`
+ //~| NOTE: expected (), found *-ptr
 }
 
 fn main() { }
index 6c9b0004f7754874e0f143038a15f8f8dd33b018..b368daaaf587c15cf874979d1a2ce9ec93c5d161 100644 (file)
 
 fn main() {
     if let Some(homura) = Some("madoka") { //~  ERROR missing an else clause
-                                           //~| expected `()`
-                                           //~| found `_`
-                                           //~| expected ()
-                                           //~| found integral variable
+                                           //~| expected type `()`
+                                           //~| found type `_`
+                                           //~| expected (), found integral variable
         765
     };
 }
index 06b058cbfe1795a5e7ef5b52cd301b8e40731b1d..ac7e0f2e9a8678b1ee2f0ee9d60a963249f44f8b 100644 (file)
@@ -14,6 +14,9 @@ fn closure_to_loc() {
     //~^ ERROR mismatched types
     //~| NOTE no two closures, even if identical, have the same type
     //~| HELP consider boxing your closure and/or using it as a trait object
+    //~| expected closure, found a different closure
+    //~| expected type `[closure
+    //~| found type `[closure
 }
 
 fn closure_from_match() {
@@ -26,6 +29,9 @@ fn closure_from_match() {
     //~^^^^^^ ERROR match arms have incompatible types
     //~| NOTE no two closures, even if identical, have the same type
     //~| HELP consider boxing your closure and/or using it as a trait object
+    //~| expected closure, found a different closure
+    //~| expected type `[closure
+    //~| found type `[closure
 }
 
 fn main() { }
index f193a07b85af9e04a3ca3521e4a4389149a11ab3..5d6b989fc968ac8c818b96d70eb5041716a878e1 100644 (file)
@@ -12,7 +12,9 @@
 fn main() {
    let x = NoCopy;
    let f = move || { let y = x; };
-   //~^ NOTE `x` moved into closure environment here because it has type `NoCopy`
+   //~^ value moved (into closure) here
    let z = x;
    //~^ ERROR use of moved value: `x`
+   //~| value used here after move
+   //~| move occurs because `x` has type `NoCopy`
 }
index a2831fd2b5ac846aeb6304fc934c2987ac03bbad..cbeac77479811fc8d37096d842f4df40473ae24f 100644 (file)
@@ -10,7 +10,7 @@
 
 fn main() {
     static foo: Fn() -> u32 = || -> u32 {
-        //~^ ERROR: mismatched types:
+        //~^ ERROR: mismatched types
         0
     };
 }
index 23e4ffb1f3076fad4e09c1c2e0f21e4a8b00cfaf..adcf8484f78285b4dbe67b59fa17120bd87ec2a9 100644 (file)
@@ -25,6 +25,7 @@ macro_rules! write {
             write(stdout, $arr.as_ptr() as *const i8,
                   $arr.len() * size_of($arr[0]));
             //~^ ERROR mismatched types
+            //~| expected u64, found usize
         }
     }}
 }
index 2a4b98563ab9f207c524827eedbccc7a6ef72982..bdcbaf09177fe8c2e53c0aeb82262de6890e0a98 100644 (file)
@@ -13,9 +13,8 @@
 fn main() {
     let b = [0; S];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `S`
-    //~| expected usize
-    //~| found struct `S`
+    //~| expected type `usize`
+    //~| found type `S`
+    //~| expected usize, found struct `S`
     //~| ERROR expected positive integer for repeat count, found struct
 }
index 78913e759a1cc080a019a9985fd6dfaaaaf96dd8..00d2969a0f67d153ed10b9b1ef60995eea921019 100644 (file)
@@ -13,10 +13,13 @@ macro_rules! foo {
         fn bar(d: u8) { }
         bar(&mut $d);
         //~^ ERROR mismatched types
+        //~| expected u8, found &-ptr
+        //~| expected type `u8`
+        //~| found type `&mut u8`
     }}
 }
 
 fn main() {
     foo!(0u8);
-    //~^ NOTE in this expansion of foo!
+    //~^ in this expansion of foo!
 }
index d0781b5658087393e06aec24f0cbfcbb2b16000d..11ff7ab2476b9475f3fbf897875cdddb7e1f96cd 100644 (file)
@@ -12,10 +12,9 @@ fn foo<T, U>(x: T, y: U) {
     let mut xx = x;
     xx = y;
     //~^  ERROR mismatched types
-    //~| expected `T`
-    //~| found `U`
-    //~| expected type parameter
-    //~| found a different type parameter
+    //~| expected type `T`
+    //~| found type `U`
+    //~| expected type parameter, found a different type parameter
 }
 
 fn main() {
index 43ef1b59ccf275e09c9f19106791ee115de8cadf..0bad7372a12d993ce9020ddd06dc2edd9ce94fc0 100644 (file)
@@ -11,6 +11,5 @@
 fn main() {
     let _p: char = 100;
     //~^ ERROR mismatched types
-    //~| expected `char`
-    //~| found `u8`
+    //~| expected char, found u8
 }
index fc918c278ef5d5d990d603cca93db5cee61672ed..e698e6da5294efd113c48e459e9caa0e3d931635 100644 (file)
@@ -12,9 +12,8 @@ fn main() {
     match None {
         Err(_) => ()
         //~^ ERROR mismatched types
-        //~| expected `std::option::Option<_>`
-        //~| found `std::result::Result<_, _>`
-        //~| expected enum `std::option::Option`
-        //~| found enum `std::result::Result`
+        //~| expected type `std::option::Option<_>`
+        //~| found type `std::result::Result<_, _>`
+        //~| expected enum `std::option::Option`, found enum `std::result::Result`
     }
 }
index b5af1f03b635b82d803734034124352eb8f69173..58423341cc6f0e88e283a338f69e8e8d367e1905 100644 (file)
@@ -13,10 +13,9 @@ fn main() {
         0
     } else if false {
 //~^ ERROR if may be missing an else clause
-//~| expected `()`
-//~| found `_`
-//~| expected ()
-//~| found integral variable
+//~| expected type `()`
+//~| found type `_`
+//~| expected (), found integral variable
         1
     };
 }
index a1804b5a2689d92978d5a406bf73a3e3c26657fa..fbd8972cbfaa6afa79505f8497ce4f8a3d5cd66a 100644 (file)
@@ -14,8 +14,7 @@ fn main() {
     let foo: [u8; 4] = [1; 4];
     bar(foo);
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `[u8; 4]`
-    //~| expected usize
-    //~| found array of 4 elements
+    //~| expected type `usize`
+    //~| found type `[u8; 4]`
+    //~| expected usize, found array of 4 elements
 }
index e7cd20f38a1d20e052470b6ef9a549ca9b8ec18b..7c0905873df8900f961438f2cc49cb9a841a77e3 100644 (file)
@@ -14,8 +14,7 @@
 fn main() {
     match 42 { A => () }
     //~^ ERROR mismatched types
-    //~| expected `_`
-    //~| found `(isize, isize)`
-    //~| expected integral variable
-    //~| found tuple
+    //~| expected type `_`
+    //~| found type `(isize, isize)`
+    //~| expected integral variable, found tuple
 }
index 304b6f185fe365342459b5a8a16e367995249b98..9e78b7b947f98e9c3e6681074e8a71556dcc8eda 100644 (file)
@@ -16,48 +16,43 @@ 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 type `(bool, bool)`
+//~| found type `A`
+//~| expected tuple, found enum `A`
         _ => ()
     }
 
     match (true, false) {
         (true, false, false) => ()
 //~^ ERROR mismatched types
-//~| expected `(bool, bool)`
-//~| found `(_, _, _)`
-//~| expected a tuple with 2 elements
-//~| found one with 3 elements
+//~| expected type `(bool, bool)`
+//~| found type `(_, _, _)`
+//~| expected a tuple with 2 elements, found one with 3 elements
     }
 
     match (true, false) {
         (true, false, false) => ()
 //~^ ERROR mismatched types
-//~| expected `(bool, bool)`
-//~| found `(_, _, _)`
-//~| expected a tuple with 2 elements
-//~| found one with 3 elements
+//~| expected type `(bool, bool)`
+//~| found type `(_, _, _)`
+//~| 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
+//~| expected type `(bool, bool)`
+//~| found type `Box<_>`
+//~| expected tuple, found box
     }
 
     match (true, false) {
         &(true, false) => ()
 //~^ ERROR mismatched types
-//~| expected `(bool, bool)`
-//~| found `&_`
-//~| expected tuple
-//~| found &-ptr
+//~| expected type `(bool, bool)`
+//~| found type `&_`
+//~| expected tuple, found &-ptr
     }
 
 
@@ -69,6 +64,5 @@ fn main() {
 
     // Make sure none of the errors above were fatal
     let x: char = true; //~  ERROR mismatched types
-                        //~| expected `char`
-                        //~| found `bool`
+                        //~| expected char, found bool
 }
index 32702d3e2f6fee2245caac9b59a4db008e938213..d8aad54fd3ee9f8ecc4d84f4ff24ae265dd63e36 100644 (file)
@@ -15,10 +15,9 @@ fn main() {
     match S(Either::Left(5)) {
         Either::Right(_) => {}
         //~^ ERROR mismatched types
-        //~| expected `S`
-        //~| found `Either<_, _>`
-        //~| expected struct `S`
-        //~| found enum `Either`
+        //~| expected type `S`
+        //~| found type `Either<_, _>`
+        //~| expected struct `S`, found enum `Either`
         _ => {}
     }
 }
index 565634191be9a8808099c81f6ad7dbe5ecd5be15..cacbf7656def2f4bf5d27cfbd558280663889c9f 100644 (file)
@@ -11,8 +11,7 @@
 fn main() {
     &panic!()
     //~^ ERROR mismatched types
-    //~| expected `()`
-    //~| found `&_`
-    //~| expected ()
-    //~| found &-ptr
+    //~| expected type `()`
+    //~| found type `&_`
+    //~| expected (), found &-ptr
 }
index e261249bc998e7b5320e904294973f6330049312..1519d71dd3be26e92a1110bd6b183eb9e3dd200a 100644 (file)
 impl<'a> BarStruct {
     fn foo(&'a mut self) -> Box<BarStruct> { self }
     //~^ ERROR mismatched types
-    //~| expected `Box<BarStruct>`
-    //~| found `&'a mut BarStruct`
-    //~| expected box
-    //~| found &-ptr
+    //~| expected type `Box<BarStruct>`
+    //~| found type `&'a mut BarStruct`
+    //~| expected box, found &-ptr
 }
 
 fn main() {}
index 4acbcb165ff081240c764c277391010b0a932094..638f45cd357765998ec6e70319742027c338fbe7 100644 (file)
@@ -15,11 +15,10 @@ fn foo(x: Whatever) {
     match x {
         Some(field) =>
 //~^ ERROR mismatched types
-//~| expected `Whatever`
-//~| found `std::option::Option<_>`
-//~| expected enum `Whatever`
-//~| found enum `std::option::Option`
-            field.access(),
+//~| expected type `Whatever`
+//~| found type `std::option::Option<_>`
+//~| expected enum `Whatever`, found enum `std::option::Option`
+            field.access(), 
     }
 }
 
index 95513860b084f340a4e9e019718ddb2b30491fd1..e0de860b0eac30ef260b9bf75f1d3c678e27c813 100644 (file)
@@ -16,25 +16,22 @@ fn main() {
     match (true, false) {
         A::B => (),
         //~^ ERROR mismatched types
-        //~| expected `(bool, bool)`
-        //~| found `A`
-        //~| expected tuple
-        //~| found enum `A`
+        //~| expected type `(bool, bool)`
+        //~| found type `A`
+        //~| expected tuple, found enum `A`
         _ => ()
     }
 
     match &Some(42) {
         Some(x) => (),
         //~^ ERROR mismatched types
-        //~| expected `&std::option::Option<_>`
-        //~| found `std::option::Option<_>`
-        //~| expected &-ptr
-        //~| found enum `std::option::Option`
+        //~| expected type `&std::option::Option<_>`
+        //~| found type `std::option::Option<_>`
+        //~| expected &-ptr, found enum `std::option::Option`
         None => ()
         //~^ ERROR mismatched types
-        //~| expected `&std::option::Option<_>`
-        //~| found `std::option::Option<_>`
-        //~| expected &-ptr
-        //~| found enum `std::option::Option`
+        //~| expected type `&std::option::Option<_>`
+        //~| found type `std::option::Option<_>`
+        //~| expected &-ptr, found enum `std::option::Option`
     }
 }
index 94dd787f08635de4a37f0132621fdd741ea35a21..9295eeb1779b09f522c1870457e47299038acb49 100644 (file)
@@ -12,6 +12,6 @@
 
 #[start]
 fn start(argc: isize, argv: *const *const u8, crate_map: *const u8) -> isize {
-    //~^ ERROR incorrect number of function parameters
+    //~^ start function has wrong type
    0
 }
index 09d5765a80f3f67c9b2a329b26c6e72abc8ef5a3..7434a6c960b2db6261936416c9e6261b0e9e35f3 100644 (file)
@@ -9,5 +9,5 @@
 // except according to those terms.
 
 fn main() -> char {
-//~^ ERROR: main function expects type
+//~^ ERROR: main function has wrong type
 }
index d9c617a71720e5a1c83f0c5800187c8bfe0086cf..431b855d5177373cfcabd13a747e6f90dbe86e48 100644 (file)
@@ -14,5 +14,5 @@ struct S {
 }
 
 fn main(foo: S) {
-//~^ ERROR: main function expects type
+//~^ ERROR: main function has wrong type
 }
index 05b870b8f41ccef1fa017f000e299055f293521f..526aa83dec7fd2410b4539818b2265c5cbf91256 100644 (file)
@@ -28,6 +28,5 @@ fn main() {
         _ => { }
     };
     //~^^^ ERROR mismatched types in range
-    //~| expected char
-    //~| found integral variable
+    //~| expected char, found integral variable
 }
index 5bda37896879bb3ff39de012b47239b8f49a6519..0dbdda1f9ba1e120f7d227b7142d8b9151c91112 100644 (file)
@@ -16,10 +16,9 @@ fn main() {
     match (S { a: 1 }) {
         E::C(_) => (),
         //~^ ERROR mismatched types
-        //~| expected `S`
-        //~| found `E`
-        //~| expected struct `S`
-        //~| found enum `E`
+        //~| expected type `S`
+        //~| found type `E`
+        //~| expected struct `S`, found enum `E`
         _ => ()
     }
 }
index 0bbba8861217da39ff341bfa6387414d07f8dd15..2831499c73d8732e5dd676ca3360631524e4f145 100644 (file)
@@ -14,9 +14,8 @@ fn main() {
     match () {
         [()] => { }
         //~^ ERROR mismatched types
-        //~| expected `()`
-        //~| found `&[_]`
-        //~| expected ()
-        //~| found &-ptr
+        //~| expected type `()`
+        //~| found type `&[_]`
+        //~| expected (), found &-ptr
     }
 }
index 57a96bb9a26ea4febfddf3fd54dc250e5b414194..ffa5287d4b2c34d5ae5a770642ed2650ece23a4a 100644 (file)
@@ -19,13 +19,11 @@ fn bar(&self) {}
 fn main() {
     let x = Foo;
     Foo::bar(x); //~  ERROR mismatched types
-                 //~| expected `&Foo`
-                 //~| found `Foo`
-                 //~| expected &-ptr
-                 //~| found struct `Foo`
+                 //~| expected type `&Foo`
+                 //~| found type `Foo`
+                 //~| expected &-ptr, found struct `Foo`
     Foo::bar(&42); //~  ERROR mismatched types
-                      //~| expected `&Foo`
-                      //~| found `&_`
-                      //~| expected struct `Foo`
-                      //~| found integral variable
+                      //~| expected type `&Foo`
+                      //~| found type `&_`
+                      //~| expected struct `Foo`, found integral variable
 }
index f30360af46eb4128fb0b0652c05b21638b417317..02c09aa7d69a261e1f36a03d12318ff2a5cccf7e 100644 (file)
@@ -16,13 +16,17 @@ fn touch<A>(_a: &A) {}
 
 fn f00() {
     let x = "hi".to_string();
-    let _y = Foo { f:x }; //~ NOTE `x` moved here
+    let _y = Foo { f:x };
+    //~^ value moved here
     touch(&x); //~ ERROR use of moved value: `x`
+    //~^ value used here after move
+    //~| move occurs because `x` has type `std::string::String`
 }
 
 fn f05() {
     let x = "hi".to_string();
-    let _y = Foo { f:(((x))) }; //~ NOTE `x` moved here
+    let _y = Foo { f:(((x))) };
+    //~^ value moved here
     touch(&x); //~ ERROR use of moved value: `x`
 }
 
index 7d209467caf2a6f75cadb25948a6625c02c163d4..bcbb8dbfad121889f68dd449358d3e49882c6382 100644 (file)
@@ -24,6 +24,8 @@ fn f10() {
     };
 
     touch(&x); //~ ERROR use of partially moved value: `x`
+    //~^ value used here after move
+    //~| move occurs because `x.f` has type `std::string::String`
 }
 
 fn main() {}
index 9eb24c81960cacc29e81d41f3101a56ef298b8b6..63e7dbd30def2fcf96fe647e0f55dc314646b4e7 100644 (file)
@@ -14,8 +14,8 @@ fn main() {
     // (separate lines to ensure the spans are accurate)
 
      let &_ //~  ERROR mismatched types
-            //~| expected `&mut _`
-            //~| found `&_`
+            //~| expected type `&mut _`
+            //~| found type `&_`
             //~| values differ in mutability
         = foo;
     let &mut _ = foo;
@@ -23,8 +23,8 @@ fn main() {
     let bar = &1;
     let &_ = bar;
     let &mut _ //~  ERROR mismatched types
-               //~| expected `&_`
-               //~| found `&mut _`
+               //~| expected type `&_`
+               //~| found type `&mut _`
                //~| values differ in mutability
          = bar;
 }
index 687e1e49ee844bb6390a7965c8076a2f521e1b4a..c950ef5b680022d3ba8d001258f82cc565c92ae4 100644 (file)
@@ -19,8 +19,7 @@ fn main() {
     // not convertible to a path.
   let x: isize = noexporttypelib::foo();
     //~^ ERROR mismatched types
-    //~| expected `isize`
-    //~| found `std::option::Option<isize>`
-    //~| expected isize
-    //~| found enum `std::option::Option`
+    //~| expected type `isize`
+    //~| found type `std::option::Option<isize>`
+    //~| expected isize, found enum `std::option::Option`
 }
index fd2903a85ddb0b43cc71ced72bb20c320d8a3a5e..5cb60079fa4b8e8fb272346010c88ed3352f1298 100644 (file)
@@ -16,7 +16,7 @@ fn main() {
     g = f;
     f = box g;
     //~^  ERROR mismatched types
-    //~| expected `_`
-    //~| found `Box<_>`
+    //~| expected type `_`
+    //~| found type `Box<_>`
     //~| cyclic type of infinite size
 }
index 036fcc1b9d77930f93f4388161b9659c6ecaf615..499124cb0573b85ebf734717aa8e14098078ebcf 100644 (file)
@@ -14,7 +14,7 @@ fn main() {
     let f;
     f = box f;
     //~^ ERROR mismatched types
-    //~| expected `_`
-    //~| found `Box<_>`
+    //~| expected type `_`
+    //~| found type `Box<_>`
     //~| cyclic type of infinite size
 }
index 9b675958003206fa52742f77b19be819ffbce29b..d9f3bb3c40f8d0d18a2b137ad81dfb6aec75cbf5 100644 (file)
@@ -31,17 +31,15 @@ fn main() {
     match 'c' {
         S { .. } => (),
         //~^ ERROR mismatched types
-        //~| expected `char`
-        //~| found `S`
-        //~| expected char
-        //~| found struct `S`
+        //~| expected type `char`
+        //~| found type `S`
+        //~| expected char, found struct `S`
 
         _ => ()
     }
     f(true);
     //~^ ERROR mismatched types
-    //~| expected `char`
-    //~| found `bool`
+    //~| expected char, found bool
 
     match () {
         E::V => {} //~ ERROR failed to resolve. Use of undeclared type or module `E`
index 1a1c87ff47d467371b0390d974bd3ad80289228a..7ece52e75378603813be2d02710378e23dcefac5 100644 (file)
@@ -13,11 +13,9 @@ fn let_in<T, F>(x: T, f: F) where F: FnOnce(T) {}
 fn main() {
     let_in(3u32, |i| { assert!(i == 3i32); });
     //~^ ERROR mismatched types
-    //~| expected `u32`
-    //~| found `i32`
+    //~| expected u32, found i32
 
     let_in(3i32, |i| { assert!(i == 3u32); });
     //~^ ERROR mismatched types
-    //~| expected `i32`
-    //~| found `u32`
+    //~| expected i32, found u32
 }
index 18e210076cb55a561699d8e2a48bcd867a44798b..ff627e69d4c58f6d4d521a25030f895329ec2a59 100644 (file)
@@ -15,19 +15,19 @@ pub fn main() {
     // *const -> *mut
     let x: *const isize = &42;
     let x: *mut isize = x; //~  ERROR mismatched types
-                           //~| expected `*mut isize`
-                           //~| found `*const isize`
+                           //~| expected type `*mut isize`
+                           //~| found type `*const isize`
                            //~| values differ in mutability
 
     // & -> *mut
     let x: *mut isize = &42; //~  ERROR mismatched types
-                             //~| expected `*mut isize`
-                             //~| found `&isize`
+                             //~| expected type `*mut isize`
+                             //~| found type `&isize`
                              //~| values differ in mutability
 
     let x: *const isize = &42;
     let x: *mut isize = x; //~  ERROR mismatched types
-                           //~| expected `*mut isize`
-                           //~| found `*const isize`
+                           //~| expected type `*mut isize`
+                           //~| found type `*const isize`
                            //~| values differ in mutability
 }
index 815f75266322354be33e7e7d0742778020d17d98..0a0867195d97600def9d4e8984cd52ea871abe93 100644 (file)
 fn main() {
     let x = vec![1];
     let y = x;
-    //~^ HELP use a `ref` binding as shown
-    //~| SUGGESTION let ref y = x;
     x; //~ ERROR use of moved value
 
     let x = vec![1];
     let mut y = x;
-    //~^ HELP use a `ref` binding as shown
-    //~| SUGGESTION let ref mut y = x;
     x; //~ ERROR use of moved value
 
     let x = (Some(vec![1]), ());
 
     match x {
         (Some(y), ()) => {},
-        //~^ HELP use a `ref` binding as shown
-        //~| SUGGESTION (Some(ref y), ()) => {},
         _ => {},
     }
     x; //~ ERROR use of partially moved value
index 7f2889a327be0f7b4e966c132fc689980d093528..64dbf27b78e48141457dd4e565c0434c28e1b8d2 100644 (file)
@@ -17,15 +17,15 @@ 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>`
+              //~| expected type `an_enum<'b>`
+              //~| found type `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>`
+              //~| expected type `a_class<'b>`
+              //~| found type `a_class<'a>`
               //~| lifetime mismatch
 }
 
index 8cc35272282c41dbf4b5744e6d7604d59b6c91f9..f6a0c86de6626ec01f16d39d37ad13d375acdb07 100644 (file)
@@ -29,8 +29,8 @@ impl<'a> Box<'a> {
     fn or<'b,G:GetRef<'b>>(&self, g2: G) -> &'a isize {
         g2.get()
         //~^ ERROR mismatched types
-        //~| expected `&'a isize`
-        //~| found `&'b isize`
+        //~| expected type `&'a isize`
+        //~| found type `&'b isize`
         //~| lifetime mismatch
 
     }
index ebf7ca289f88969af34ea46342c3358dbf32b959..c0116b21166e0350429cc6063306b82bf5b22fac 100644 (file)
@@ -55,10 +55,9 @@ fn supply_G() {
     want_G(bar);
     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
+    //~| expected type `fn(&'cx S) -> &'static S`
+    //~| found type `fn(&S) -> &S {baz}`
+    //~| expected concrete lifetime, found bound lifetime parameter 'cx
 }
 
 pub fn main() {
index 83b9d4633dcf360289f50511d0239d04198945ae..131b7170951f6360fea97ebed9adfb6ac9eb6875 100644 (file)
@@ -27,10 +27,10 @@ fn take_direct<'a,'b>(p: direct<'a>) -> direct<'b> { p } //~ ERROR mismatched ty
 fn take_indirect1(p: indirect1) -> indirect1 { p }
 
 fn take_indirect2<'a,'b>(p: indirect2<'a>) -> indirect2<'b> { p } //~ ERROR mismatched types
-//~| expected `indirect2<'b>`
-//~| found `indirect2<'a>`
+//~| expected type `indirect2<'b>`
+//~| found type `indirect2<'a>`
 //~| ERROR mismatched types
-//~| expected `indirect2<'b>`
-//~| found `indirect2<'a>`
+//~| expected type `indirect2<'b>`
+//~| found type `indirect2<'a>`
 
 fn main() {}
index 1d32e8fe7b250c595d2f508e55bfaeb4ff79caa4..fad115c2aedf83a3d4515a37c4721b5c96d137dc 100644 (file)
@@ -32,8 +32,8 @@ fn set_f_ok(&mut self, b: Box<b<'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>>`
+        //~| expected type `Box<Box<&'a isize>>`
+        //~| found type `Box<Box<&isize>>`
         //~| lifetime mismatch
     }
 }
index adc870224037802c1e7c10c1eeb93bc79f64dc42..1ea956bbd54891f06c8899f784941e49fe897fef 100644 (file)
@@ -38,8 +38,8 @@ impl<'ml>               Drop for M<'ml>         { fn drop(&mut self) { } } // AC
 
 impl                    Drop for N<'static>     { fn drop(&mut self) { } } // REJECT
 //~^ ERROR mismatched types
-//~| expected `N<'n>`
-//~|    found `N<'static>`
+//~| expected type `N<'n>`
+//~|    found type `N<'static>`
 
 impl<Cok_nobound> Drop for O<Cok_nobound> { fn drop(&mut self) { } } // ACCEPT
 
index 10b722946a8a89f847c5af45081ee29e40f9470c..ab5af64d95c1352d215b1757f29227c17360e458 100644 (file)
@@ -16,52 +16,45 @@ fn main() {
     //~^ ERROR expected constant integer for repeat count, found variable [E0307]
     let b = [0; ()];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `()`
-    //~| expected usize
-    //~| found ()) [E0308]
+    //~| expected type `usize`
+    //~| found type `()`
+    //~| expected usize, found ()
     //~| ERROR expected positive integer for repeat count, found tuple [E0306]
     let c = [0; true];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `bool`
+    //~| expected usize, found bool
     //~| ERROR expected positive integer for repeat count, found boolean [E0306]
     let d = [0; 0.5];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `_`
-    //~| expected usize
-    //~| found floating-point variable) [E0308]
+    //~| expected type `usize`
+    //~| found type `_`
+    //~| expected usize, found floating-point variable
     //~| ERROR expected positive integer for repeat count, found float [E0306]
     let e = [0; "foo"];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `&'static str`
-    //~| expected usize
-    //~| found &-ptr) [E0308]
+    //~| expected type `usize`
+    //~| found type `&'static str`
+    //~| expected usize, found &-ptr
     //~| ERROR expected positive integer for repeat count, found string literal [E0306]
     let f = [0; -4_isize];
     //~^ ERROR mismatched types
     //~| expected `usize`
-    //~| found `isize` [E0308]
+    //~| found `isize`
     //~| ERROR mismatched types:
-    //~| expected `usize`,
-    //~| found `isize` [E0307]
+    //~| expected usize, found isize
     let f = [0_usize; -1_isize];
     //~^ ERROR mismatched types
     //~| expected `usize`
-    //~| found `isize` [E0308]
+    //~| found `isize`
     //~| ERROR mismatched types
-    //~| expected `usize`
-    //~| found `isize` [E0307]
+    //~| expected usize, found isize
     struct G {
         g: (),
     }
     let g = [0; G { g: () }];
     //~^ ERROR mismatched types
-    //~| expected `usize`
-    //~| found `main::G`
-    //~| expected usize
-    //~| found struct `main::G`) [E0308]
+    //~| expected type `usize`
+    //~| found type `main::G`
+    //~| expected usize, found struct `main::G`
     //~| ERROR expected positive integer for repeat count, found struct [E0306]
 }
index 560af9193b35ea8b2eb34402faa53be07c0bed3a..2d06161111ef1f867ea0bbda303b47793391a771 100644 (file)
@@ -34,8 +34,7 @@ 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`
+    //~| expected i32, found i64
 }
 
 fn main() {
index e6acc32545178734bb080c908b3bca3b7c24de0d..874cca8cb3fd03c709282a7712e8a29fe1c6b650 100644 (file)
@@ -16,7 +16,7 @@ fn main() {
 
     let y: &mut[_] = &x[2..4];
     //~^ ERROR mismatched types
-    //~| expected `&mut [_]`
-    //~| found `&[isize]`
+    //~| expected type `&mut [_]`
+    //~| found type `&[isize]`
     //~| values differ in mutability
 }
index 3c1c3796a246f172baef08c48c056dc541f0a923..3140bb6e5731d04d5822800e32fd00eb06dceb09 100644 (file)
@@ -16,10 +16,9 @@ fn main() {
     match Foo(1.1, marker::PhantomData) {
         1 => {}
     //~^ ERROR mismatched types
-    //~| expected `Foo<_, _>`
-    //~| found `_`
-    //~| expected struct `Foo`
-    //~| found integral variable
+    //~| expected type `Foo<_, _>`
+    //~| found type `_`
+    //~| expected struct `Foo`, found integral variable
     }
 
 }
index 83e73b6bc3ef47d08f894c654dc4207c0e95af9b..1250d0dabcd9a561e87db5a136d2cf65c6e89c76 100644 (file)
@@ -19,13 +19,11 @@ struct Bar { x: isize }
 fn main() {
     let b = Bar { x: 5 };
     let f = Foo { a: 2, ..b }; //~  ERROR mismatched types
-                               //~| expected `Foo`
-                               //~| found `Bar`
-                               //~| expected struct `Foo`
-                               //~| found struct `Bar`
+                               //~| expected type `Foo`
+                               //~| found type `Bar`
+                               //~| expected struct `Foo`, found struct `Bar`
     let f__isize = Foo { a: 2, ..4 }; //~  ERROR mismatched types
-                                 //~| expected `Foo`
-                                 //~| found `_`
-                                 //~| expected struct `Foo`
-                                 //~| found integral variable
+                                 //~| expected type `Foo`
+                                 //~| found type `_`
+                                 //~| expected struct `Foo`, found integral variable
 }
index c98131560d486f3124b60084ce5c15717e78c6dc..4503e465840fe73bfb6f5b0364f52e0f72f82fb7 100644 (file)
@@ -18,15 +18,13 @@ struct Bar { x: isize }
 
 static bar: Bar = Bar { x: 5 };
 static foo: Foo = Foo { a: 2, ..bar }; //~  ERROR mismatched types
-                                       //~| expected `Foo`
-                                       //~| found `Bar`
-                                       //~| expected struct `Foo`
-                                       //~| found struct `Bar`
+                                       //~| expected type `Foo`
+                                       //~| found type `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
+                                       //~| expected type `Foo`
+                                       //~| found type `_`
+                                       //~| expected struct `Foo`, found integral variable
 
 fn main() {
     let b = Bar { x: 5 };
index 7a6b8ff662240314cfa9086b1055639a24bbc544..87fc5ba93aeb3c384e926263c24f8a93dd5d1b78 100644 (file)
@@ -26,38 +26,32 @@ fn main() {
     let pt = PointF {
         x: 1,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
         y: 2,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
     };
 
     let pt2 = Point::<f32> {
         x: 3,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
         y: 4,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
     };
 
     let pair = PairF {
         x: 5,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
         y: 6,
     };
 
     let pair2 = PairF::<i32> {
         x: 7,
         //~^ ERROR mismatched types
-        //~| expected f32
-        //~| found integral variable
+        //~| expected f32, found integral variable
         y: 8,
     };
 
index 8dd9994b234bac1a99aebfdecf5fbb2781d075eb..c857790e342d0270921b9028c0b0329c2a5b22ae 100644 (file)
@@ -24,36 +24,36 @@ fn main() {}
 fn foo<'z>() where &'z (): Sized {
     let x: () = <i8 as Foo<'static, 'static,  u8>>::bar::<'static, char>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected `()`
-    //[verbose]~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
+    //[verbose]~| expected type `()`
+    //[verbose]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::bar::<ReStatic, char>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected `()`
-    //[normal]~| found `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
+    //[normal]~| expected type `()`
+    //[normal]~| found type `fn() {<i8 as Foo<'static, 'static, u8>>::bar::<'static, char>}`
 
 
     let x: () = <i8 as Foo<'static, 'static,  u32>>::bar::<'static, char>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected `()`
-    //[verbose]~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u32>>::bar::<ReStatic, char>}`
+    //[verbose]~| expected type `()`
+    //[verbose]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic, u32>>::bar::<ReStatic, char>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected `()`
-    //[normal]~| found `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
+    //[normal]~| expected type `()`
+    //[normal]~| found type `fn() {<i8 as Foo<'static, 'static>>::bar::<'static, char>}`
 
     let x: () = <i8 as Foo<'static, 'static,  u8>>::baz;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected `()`
-    //[verbose]~| found `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
+    //[verbose]~| expected type `()`
+    //[verbose]~| found type `fn() {<i8 as Foo<ReStatic, ReStatic, u8>>::baz}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected `()`
-    //[normal]~| found `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
+    //[normal]~| expected type `()`
+    //[normal]~| found type `fn() {<i8 as Foo<'static, 'static, u8>>::baz}`
 
     let x: () = foo::<'static>;
     //[verbose]~^ ERROR mismatched types
-    //[verbose]~| expected `()`
-    //[verbose]~| found `fn() {foo::<ReStatic>}`
+    //[verbose]~| expected type `()`
+    //[verbose]~| found type `fn() {foo::<ReStatic>}`
     //[normal]~^^^^ ERROR mismatched types
-    //[normal]~| expected `()`
-    //[normal]~| found `fn() {foo::<'static>}`
+    //[normal]~| expected type `()`
+    //[normal]~| found type `fn() {foo::<'static>}`
 
     <str as Foo<u8>>::bar;
     //[verbose]~^ ERROR `str: std::marker::Sized` is not satisfied
index 44de5d8cfe353b083a083534a1185a493540fef0..9a4a52ced2008d44cb6346e4c7f0aeda0e41a2b6 100644 (file)
@@ -11,9 +11,8 @@
 fn main() {
     let (x, y) = ();
 //~^ ERROR mismatched types
-//~| expected `()`
-//~| found `(_, _)`
-//~| expected ()
-//~| found tuple
+//~| expected type `()`
+//~| found type `(_, _)`
+//~| expected (), found tuple
     return x;
 }
index 725234dfeab5600c3d8ba230866a9a73ececcc51..8f420f1ce4b0d1d592fd6fa30937a9ebc3e4e52a 100644 (file)
@@ -21,8 +21,7 @@ fn main() {
     let y;
     let x : char = last(y);
     //~^ ERROR mismatched types
-    //~| expected `char`
-    //~| found `std::option::Option<_>`
-    //~| expected char
-    //~| found enum `std::option::Option`
+    //~| expected type `char`
+    //~| found type `std::option::Option<_>`
+    //~| expected char, found enum `std::option::Option`
 }
index 60db35b879f570c03f9dfd1bc2ba5362fef82a26..4a21e1339811e748e26c6aef79f1d9b87b896abb 100644 (file)
@@ -21,10 +21,9 @@ struct bar {
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
     want_foo(b); //~  ERROR mismatched types
-                 //~| expected `foo`
-                 //~| found `bar`
-                 //~| expected struct `foo`
-                 //~| found struct `bar`
+                 //~| expected type `foo`
+                 //~| found type `bar`
+                 //~| expected struct `foo`, found struct `bar`
 }
 
 fn main() {}
index 231d2366b48a85ceb045ccaaf187ed78112ac241..592d7b3929bfc09129a07f294eec2a744f0a5ecf 100644 (file)
@@ -19,10 +19,9 @@ struct foo {
 fn want_foo(f: foo) {}
 fn have_bar(b: bar) {
     want_foo(b); //~  ERROR mismatched types
-                 //~| expected `foo`
-                 //~| found `Box<foo>`
-                 //~| expected struct `foo`
-                 //~| found box
+                 //~| expected type `foo`
+                 //~| found type `Box<foo>`
+                 //~| expected struct `foo`, found box
 }
 
 fn main() {}
index f42c8d09a9c09127961ab68263bf5a8a51c89ddf..24627e94208748651be95d740ba13fda68e7c7f1 100644 (file)
@@ -22,6 +22,9 @@ pub fn ensure_dir_exists<P: AsRef<Path>, F: FnOnce(&Path)>(path: P,
             callback(path.as_ref();  //~ NOTE: unclosed delimiter
                      //~^ ERROR: expected one of
             fs::create_dir_all(path.as_ref()).map(|()| true) //~ ERROR: mismatched types
+            //~^ expected (), found enum `std::result::Result`
+            //~| expected type `()`
+            //~| found type `std::result::Result<bool, std::io::Error>`
         } else { //~ ERROR: incorrect close delimiter: `}`
             //~^ ERROR: expected one of
             Ok(false);
index 836f08d0e78bb21d2fe2fcf5786f6f9cca1d7acf..1fff812af5b8d9f1e00f7941720b870555890ef6 100644 (file)
@@ -22,10 +22,9 @@ fn c(x: Box<Foo+Sync+Send>) {
 
 fn d(x: Box<Foo>) {
     a(x); //~  ERROR mismatched types
-          //~| expected `Box<Foo + Send + 'static>`
-          //~| found `Box<Foo + 'static>`
-          //~| expected bounds `Send`
-          //~| found no bounds
+          //~| expected type `Box<Foo + Send + 'static>`
+          //~| found type `Box<Foo + 'static>`
+          //~| expected bounds `Send`, found no bounds
 }
 
 fn main() { }
index 8ad9ca50e30426d694e1adc1a3e6f9568f62bed6..e62255a4e77d4301756320a6cd13c25f5f5c69fa 100644 (file)
@@ -15,15 +15,13 @@ fn first((value, _): (isize, f64)) -> isize { value }
 fn main() {
     let y = first ((1,2.0,3));
     //~^ ERROR mismatched types
-    //~| expected `(isize, f64)`
-    //~| found `(isize, f64, _)`
-    //~| expected a tuple with 2 elements
-    //~| found one with 3 elements
+    //~| expected type `(isize, f64)`
+    //~| found type `(isize, f64, _)`
+    //~| expected a tuple with 2 elements, found one with 3 elements
 
     let y = first ((1,));
     //~^ ERROR mismatched types
-    //~| expected `(isize, f64)`
-    //~| found `(isize,)`
-    //~| expected a tuple with 2 elements
-    //~| found one with 1 elements
+    //~| expected type `(isize, f64)`
+    //~| found type `(isize,)`
+    //~| expected a tuple with 2 elements, found one with 1 elements
 }
index 99d6437c02ed4ecbab77b8fdd2abe1800fc85bf6..dadf7eb91d8f46f0b5d74d947a096382a7689dd1 100644 (file)
@@ -18,12 +18,10 @@ fn identity_u16(n: u16) -> u16 { n }
     identity_u8(x);  // after this, `x` is assumed to have type `u8`
     identity_u16(x);
     //~^ ERROR mismatched types
-    //~| expected `u16`
-    //~| found `u8`
+    //~| expected u16, found u8
     identity_u16(y);
     //~^ ERROR mismatched types
-    //~| expected `u16`
-    //~| found `i32`
+    //~| expected u16, found i32
 
     let a = 3;
 
@@ -32,6 +30,5 @@ fn identity_i(n: isize) -> isize { n }
     identity_i(a); // ok
     identity_u16(a);
     //~^ ERROR mismatched types
-    //~| expected `u16`
-    //~| found `isize`
+    //~| expected u16, found isize
 }
index dd8f54cdabb8fe92c2945716848f2c1518b095a0..0f174d99fefcbe4b5d952776a7ec7d906dc7179a 100644 (file)
 
 fn main() { let a: bool = 1; let b: i32 = true; }
 //~^ ERROR mismatched types
-//~| expected `bool`
-//~| found `_`
-//~| expected bool
-//~| found integral variable
+//~| expected type `bool`
+//~| found type `_`
+//~| expected bool, found integral variable
 //~| ERROR mismatched types
-//~| expected `i32`
-//~| found `bool`
+//~| expected i32, found bool
 
index e81ae5d743939276ec3bb78eae3be3cca259ece9..e74acaa71b0f3d5f347955f5c75d93a3b5089ca3 100644 (file)
@@ -23,9 +23,17 @@ fn main() {
     let bar2 = {extern crate crate_a2 as a; a::bar()};
     {
         extern crate crate_a1 as a;
-        a::try_foo(foo2); //~ ERROR mismatched types
-                          //~^ NOTE Perhaps two different versions of crate `crate_a1`
-        a::try_bar(bar2); //~ ERROR mismatched types
-                          //~^ NOTE Perhaps two different versions of crate `crate_a1`
+        a::try_foo(foo2);
+        //~^ ERROR mismatched types
+        //~| Perhaps two different versions of crate `crate_a1`
+        //~| expected struct `main::a::Foo`
+        //~| expected type `main::a::Foo`
+        //~| found type `main::a::Foo`
+        a::try_bar(bar2);
+        //~^ ERROR mismatched types
+        //~| Perhaps two different versions of crate `crate_a1`
+        //~| expected trait `main::a::Bar`
+        //~| expected type `Box<main::a::Bar + 'static>`
+        //~| found type `Box<main::a::Bar>`
     }
 }
index 408bf72e97c87cd1f09a1c2a569aea348e9ba6d5..11a2fc2665ca46ff56c9731fbe25a123251f1e78 100644 (file)
 fn foo<Foo, Bar>(x: Foo) -> Bar {
     x
 //~^ ERROR mismatched types
-//~| expected `Bar`
-//~| found `Foo`
-//~| expected type parameter
-//~| found a different type parameter
+//~| expected type `Bar`
+//~| found type `Foo`
+//~| expected type parameter, found a different type parameter
 }
 
 fn main() {}
index 155b835bbc6e0704d4e24657cb40398c6d7f7615..26eac6adde221b296b0804388b6ed4f67e06e6f0 100644 (file)
 trait BrokenAdd: Copy + Add<Output=Self> {
     fn broken_add<T>(&self, rhs: T) -> Self {
         *self + rhs //~  ERROR mismatched types
-                    //~| expected `Self`
-                    //~| found `T`
-                    //~| expected Self
-                    //~| found type parameter
+                    //~| expected type `Self`
+                    //~| found type `T`
+                    //~| expected Self, found type parameter
     }
 }
 
index 1daea8f915b3f192000223342b02f915492c35f3..91e3c38322e4725ac0e224df5b0c81497b092405 100644 (file)
@@ -22,18 +22,16 @@ pub fn main() {
 fn test1() {
     let x: Foo<_> = Bar::<usize>(PhantomData);
     //~^ ERROR mismatched types
-    //~| expected `Foo<_>`
-    //~| found `Bar<usize>`
-    //~| expected struct `Foo`
-    //~| found struct `Bar`
+    //~| expected type `Foo<_>`
+    //~| found type `Bar<usize>`
+    //~| expected struct `Foo`, found struct `Bar`
     let y: Foo<usize> = x;
 }
 
 fn test2() {
     let x: Foo<_> = Bar::<usize>(PhantomData);
     //~^ ERROR mismatched types
-    //~| expected `Foo<_>`
-    //~| found `Bar<usize>`
-    //~| expected struct `Foo`
-    //~| found struct `Bar`
+    //~| expected type `Foo<_>`
+    //~| found type `Bar<usize>`
+    //~| expected struct `Foo`, found struct `Bar`
 }
index e54a7623cb0c3c4a5b7c5787e94d0d1545425f7b..f14a3505cdeb486510da18e7f6dd72d2184f8d58 100644 (file)
@@ -45,12 +45,12 @@ fn dummy2(self: &Bar<T>) {} //~ ERROR mismatched types
     //~^ ERROR mismatched types
     fn dummy3(self: &&Bar<T>) {}
     //~^ ERROR mismatched types
-    //~| expected `&&'a Bar<T>`
-    //~| found `&&Bar<T>`
+    //~| expected type `&&'a Bar<T>`
+    //~| found type `&&Bar<T>`
     //~| lifetime mismatch
     //~| ERROR mismatched types
-    //~| expected `&&'a Bar<T>`
-    //~| found `&&Bar<T>`
+    //~| expected type `&&'a Bar<T>`
+    //~| found type `&&Bar<T>`
     //~| lifetime mismatch
 }
 
index 6e60562da67495513b829dec5462f0474d23f4d0..b43159b0d96b042fbd51c2494632730897602223 100644 (file)
@@ -21,17 +21,15 @@ fn main() {
 
         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, ...) {foo}`
-        //~| expected non-variadic fn
-        //~| found variadic function
+        //~| expected type `unsafe extern "C" fn(isize, u8)`
+        //~| found type `unsafe extern "C" fn(isize, u8, ...) {foo}`
+        //~| NOTE: expected non-variadic fn, found variadic function
 
         let y: extern "C" fn(f: isize, x: u8, ...) = bar;
         //~^ ERROR: mismatched types
-        //~| expected `extern "C" fn(isize, u8, ...)`
-        //~| found `extern "C" fn(isize, u8) {bar}`
-        //~| expected variadic fn
-        //~| found non-variadic function
+        //~| expected type `extern "C" fn(isize, u8, ...)`
+        //~| found type `extern "C" fn(isize, u8) {bar}`
+        //~| NOTE: 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`