about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/etc/generate-deriving-span-tests.py4
-rw-r--r--src/test/compile-fail/E0017.rs6
-rw-r--r--src/test/compile-fail/E0388.rs3
-rw-r--r--src/test/compile-fail/borrowck/borrowck-overloaded-call.rs1
-rw-r--r--src/test/compile-fail/borrowck/borrowck-unboxed-closures.rs1
-rw-r--r--src/test/compile-fail/check-static-immutable-mut-slices.rs1
-rw-r--r--src/test/compile-fail/const-err.rs5
-rw-r--r--src/test/compile-fail/const-err2.rs1
-rw-r--r--src/test/compile-fail/cycle-trait-default-type-trait.rs1
-rw-r--r--src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-Clone-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-Clone-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Clone-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-Debug-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-Debug-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Debug-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Default-struct.rs4
-rw-r--r--src/test/compile-fail/derives-span-Default-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-Eq-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-Eq-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Eq-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-Hash-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-Hash-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Hash-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-Ord-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-Ord-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-Ord-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs2
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-enum.rs2
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs2
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs8
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-enum.rs8
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-struct.rs8
-rw-r--r--src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs8
-rw-r--r--src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs1
-rw-r--r--src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs1
-rw-r--r--src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs1
-rw-r--r--src/test/compile-fail/issue-17718-const-bad-values.rs2
-rw-r--r--src/test/compile-fail/issue-20831-debruijn.rs1
-rw-r--r--src/test/compile-fail/issue-41255.rs4
-rw-r--r--src/test/compile-fail/lint-stability-deprecated.rs1
-rw-r--r--src/test/compile-fail/patkind-litrange-no-expr.rs3
-rw-r--r--src/test/compile-fail/range_traits-1.rs61
-rw-r--r--src/test/compile-fail/regions-bound-missing-bound-in-impl.rs1
-rw-r--r--src/test/compile-fail/regions-close-object-into-object-5.rs1
50 files changed, 47 insertions, 139 deletions
diff --git a/src/etc/generate-deriving-span-tests.py b/src/etc/generate-deriving-span-tests.py
index 6642da858e5..15c9fc2e504 100755
--- a/src/etc/generate-deriving-span-tests.py
+++ b/src/etc/generate-deriving-span-tests.py
@@ -74,7 +74,7 @@ struct Struct(
 
 ENUM_TUPLE, ENUM_STRUCT, STRUCT_FIELDS, STRUCT_TUPLE = range(4)
 
-def create_test_case(type, trait, super_traits, number_of_errors):
+def create_test_case(type, trait, super_traits, error_count):
     string = [ENUM_STRING, ENUM_STRUCT_VARIANT_STRING, STRUCT_STRING, STRUCT_TUPLE_STRING][type]
     all_traits = ','.join([trait] + super_traits)
     super_traits = ','.join(super_traits)
@@ -113,7 +113,7 @@ traits = {
 
 for (trait, supers, errs) in [('Clone', [], 1),
                               ('PartialEq', [], 2),
-                              ('PartialOrd', ['PartialEq'], 9),
+                              ('PartialOrd', ['PartialEq'], 3),
                               ('Eq', ['PartialEq'], 1),
                               ('Ord', ['Eq', 'PartialOrd', 'PartialEq'], 1),
                               ('Debug', [], 1),
diff --git a/src/test/compile-fail/E0017.rs b/src/test/compile-fail/E0017.rs
index c6bec6090f2..726a6f8c6fe 100644
--- a/src/test/compile-fail/E0017.rs
+++ b/src/test/compile-fail/E0017.rs
@@ -13,15 +13,9 @@ const C: i32 = 2;
 
 const CR: &'static mut i32 = &mut C; //~ ERROR E0017
                                      //~| NOTE constants require immutable values
-                                     //~| ERROR E0017
-                                     //~| NOTE constants require immutable values
 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
                                               //~| NOTE statics require immutable values
-                                              //~| ERROR E0017
-                                              //~| NOTE statics require immutable values
                                               //~| ERROR cannot borrow
 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
                                              //~| NOTE statics require immutable values
-                                             //~| ERROR E0017
-                                             //~| NOTE statics require immutable values
 fn main() {}
diff --git a/src/test/compile-fail/E0388.rs b/src/test/compile-fail/E0388.rs
index 2c88039d373..c002badfef6 100644
--- a/src/test/compile-fail/E0388.rs
+++ b/src/test/compile-fail/E0388.rs
@@ -12,11 +12,8 @@ static X: i32 = 1;
 const C: i32 = 2;
 
 const CR: &'static mut i32 = &mut C; //~ ERROR E0017
-                                     //~| ERROR E0017
 static STATIC_REF: &'static mut i32 = &mut X; //~ ERROR E0017
-                                              //~| ERROR E0017
                                               //~| ERROR cannot borrow
 static CONST_REF: &'static mut i32 = &mut C; //~ ERROR E0017
-                                             //~| ERROR E0017
 
 fn main() {}
diff --git a/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs b/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
index 4c20688331b..41f3e472cd1 100644
--- a/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
+++ b/src/test/compile-fail/borrowck/borrowck-overloaded-call.rs
@@ -67,7 +67,6 @@ fn f() {
     };
     let sp = &mut s;
     s(3);   //~ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable
-    //~^ ERROR cannot borrow `s` as immutable because it is also borrowed as mutable
 }
 
 fn g() {
diff --git a/src/test/compile-fail/borrowck/borrowck-unboxed-closures.rs b/src/test/compile-fail/borrowck/borrowck-unboxed-closures.rs
index 0f9829ab259..4813b4b6a72 100644
--- a/src/test/compile-fail/borrowck/borrowck-unboxed-closures.rs
+++ b/src/test/compile-fail/borrowck/borrowck-unboxed-closures.rs
@@ -11,7 +11,6 @@
 fn a<F:Fn(isize, isize) -> isize>(mut f: F) {
     let g = &mut f;
     f(1, 2);    //~ ERROR cannot borrow `f` as immutable
-    //~^ ERROR cannot borrow `f` as immutable
 }
 
 fn b<F:FnMut(isize, isize) -> isize>(f: F) {
diff --git a/src/test/compile-fail/check-static-immutable-mut-slices.rs b/src/test/compile-fail/check-static-immutable-mut-slices.rs
index 370cfe9d550..1804b9e04c2 100644
--- a/src/test/compile-fail/check-static-immutable-mut-slices.rs
+++ b/src/test/compile-fail/check-static-immutable-mut-slices.rs
@@ -12,6 +12,5 @@
 
 static TEST: &'static mut [isize] = &mut [];
 //~^ ERROR references in statics may only refer to immutable values
-//~^^ ERROR references in statics may only refer to immutable values
 
 pub fn main() { }
diff --git a/src/test/compile-fail/const-err.rs b/src/test/compile-fail/const-err.rs
index 944e458c4c0..e65194ab56f 100644
--- a/src/test/compile-fail/const-err.rs
+++ b/src/test/compile-fail/const-err.rs
@@ -24,8 +24,6 @@ fn black_box<T>(_: T) {
 const FOO: u8 = [5u8][1];
 //~^ ERROR constant evaluation error
 //~| index out of bounds: the len is 1 but the index is 1
-//~^^^ ERROR constant evaluation error
-//~| index out of bounds: the len is 1 but the index is 1
 
 fn main() {
     let a = -std::i8::MIN;
@@ -33,8 +31,7 @@ fn main() {
     //~| attempt to negate with overflow
     let b = 200u8 + 200u8 + 200u8;
     //~^ WARN this expression will panic at run-time
-    //~| attempt to add with overflow
-    //~^^^ WARN this expression will panic at run-time
+    //~^^ WARN this expression will panic at run-time
     //~| attempt to add with overflow
     let c = 200u8 * 4;
     //~^ WARN this expression will panic at run-time
diff --git a/src/test/compile-fail/const-err2.rs b/src/test/compile-fail/const-err2.rs
index 7c1fb2ccd47..9889ca1392a 100644
--- a/src/test/compile-fail/const-err2.rs
+++ b/src/test/compile-fail/const-err2.rs
@@ -21,7 +21,6 @@ fn main() {
     //~^ ERROR attempt to negate with overflow
     let b = 200u8 + 200u8 + 200u8;
     //~^ ERROR attempt to add with overflow
-    //~| ERROR attempt to add with overflow
     let c = 200u8 * 4;
     //~^ ERROR attempt to multiply with overflow
     let d = 42u8 - (42u8 + 1);
diff --git a/src/test/compile-fail/cycle-trait-default-type-trait.rs b/src/test/compile-fail/cycle-trait-default-type-trait.rs
index 6825572b26c..e6caeb34a8c 100644
--- a/src/test/compile-fail/cycle-trait-default-type-trait.rs
+++ b/src/test/compile-fail/cycle-trait-default-type-trait.rs
@@ -13,7 +13,6 @@
 
 trait Foo<X = Box<Foo>> {
     //~^ ERROR unsupported cyclic reference
-    //~| ERROR unsupported cyclic reference
 }
 
 fn main() { }
diff --git a/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs
index 0b73f5bebb2..244acbf6605 100644
--- a/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Clone-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Clone-enum.rs b/src/test/compile-fail/derives-span-Clone-enum.rs
index 6944ea38b37..785a3d35430 100644
--- a/src/test/compile-fail/derives-span-Clone-enum.rs
+++ b/src/test/compile-fail/derives-span-Clone-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Clone-struct.rs b/src/test/compile-fail/derives-span-Clone-struct.rs
index 92bf148ccbd..b1b1dc7bed1 100644
--- a/src/test/compile-fail/derives-span-Clone-struct.rs
+++ b/src/test/compile-fail/derives-span-Clone-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Clone-tuple-struct.rs b/src/test/compile-fail/derives-span-Clone-tuple-struct.rs
index 21adfc90301..d56e21b9a8a 100644
--- a/src/test/compile-fail/derives-span-Clone-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Clone-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs
index da777e8a14b..4c25e482c2a 100644
--- a/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Debug-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Debug-enum.rs b/src/test/compile-fail/derives-span-Debug-enum.rs
index bf5d3f2d81b..0cb02aa54e6 100644
--- a/src/test/compile-fail/derives-span-Debug-enum.rs
+++ b/src/test/compile-fail/derives-span-Debug-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Debug-struct.rs b/src/test/compile-fail/derives-span-Debug-struct.rs
index b0b275fa2d3..33fa82355ec 100644
--- a/src/test/compile-fail/derives-span-Debug-struct.rs
+++ b/src/test/compile-fail/derives-span-Debug-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Debug-tuple-struct.rs b/src/test/compile-fail/derives-span-Debug-tuple-struct.rs
index 9689054a7be..760ed199f6a 100644
--- a/src/test/compile-fail/derives-span-Debug-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Debug-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Default-struct.rs b/src/test/compile-fail/derives-span-Default-struct.rs
index 68b99ed25b8..4adfe75adaf 100644
--- a/src/test/compile-fail/derives-span-Default-struct.rs
+++ b/src/test/compile-fail/derives-span-Default-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -15,7 +15,7 @@ struct Error;
 
 #[derive(Default)]
 struct Struct {
-    x: Error //~ ERROR `Error: std::default::Default` is not satisfied
+    x: Error //~ ERROR
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/derives-span-Default-tuple-struct.rs b/src/test/compile-fail/derives-span-Default-tuple-struct.rs
index 822abe975a1..a5e3a7cd49f 100644
--- a/src/test/compile-fail/derives-span-Default-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Default-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs
index fdc74d5fef6..6abd1d31e66 100644
--- a/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Eq-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Eq-enum.rs b/src/test/compile-fail/derives-span-Eq-enum.rs
index 4bf30fdf93f..f361278a620 100644
--- a/src/test/compile-fail/derives-span-Eq-enum.rs
+++ b/src/test/compile-fail/derives-span-Eq-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Eq-struct.rs b/src/test/compile-fail/derives-span-Eq-struct.rs
index 685188f1337..7067caa6d5c 100644
--- a/src/test/compile-fail/derives-span-Eq-struct.rs
+++ b/src/test/compile-fail/derives-span-Eq-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Eq-tuple-struct.rs b/src/test/compile-fail/derives-span-Eq-tuple-struct.rs
index 0e636d027dd..1a09628b770 100644
--- a/src/test/compile-fail/derives-span-Eq-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Eq-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs
index bfb6566223c..907045cce47 100644
--- a/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Hash-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Hash-enum.rs b/src/test/compile-fail/derives-span-Hash-enum.rs
index 99f28b376df..321b9e71a0f 100644
--- a/src/test/compile-fail/derives-span-Hash-enum.rs
+++ b/src/test/compile-fail/derives-span-Hash-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Hash-struct.rs b/src/test/compile-fail/derives-span-Hash-struct.rs
index acfd5aa7b2a..7f69c3a8e25 100644
--- a/src/test/compile-fail/derives-span-Hash-struct.rs
+++ b/src/test/compile-fail/derives-span-Hash-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Hash-tuple-struct.rs b/src/test/compile-fail/derives-span-Hash-tuple-struct.rs
index 3d76b29834f..2dee63c4298 100644
--- a/src/test/compile-fail/derives-span-Hash-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Hash-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs b/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs
index 06ee588e69f..8f4e393c96a 100644
--- a/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-Ord-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Ord-enum.rs b/src/test/compile-fail/derives-span-Ord-enum.rs
index af9cfbc9110..b8ceacf3753 100644
--- a/src/test/compile-fail/derives-span-Ord-enum.rs
+++ b/src/test/compile-fail/derives-span-Ord-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Ord-struct.rs b/src/test/compile-fail/derives-span-Ord-struct.rs
index 4477d933a6c..2ff62bac2bc 100644
--- a/src/test/compile-fail/derives-span-Ord-struct.rs
+++ b/src/test/compile-fail/derives-span-Ord-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-Ord-tuple-struct.rs b/src/test/compile-fail/derives-span-Ord-tuple-struct.rs
index ebc75186412..24eacb71d7b 100644
--- a/src/test/compile-fail/derives-span-Ord-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-Ord-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs b/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs
index 7c98dcc2a6f..14d94f1599e 100644
--- a/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-PartialEq-enum.rs b/src/test/compile-fail/derives-span-PartialEq-enum.rs
index fe6355e456c..ab58bb938b9 100644
--- a/src/test/compile-fail/derives-span-PartialEq-enum.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-PartialEq-struct.rs b/src/test/compile-fail/derives-span-PartialEq-struct.rs
index 10d9d642776..05a0990ff03 100644
--- a/src/test/compile-fail/derives-span-PartialEq-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs b/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs
index c92eb0f63c4..cdeb7ce45bc 100644
--- a/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialEq-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
diff --git a/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs
index 898104d0ab2..cf3d69bc16c 100644
--- a/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -19,12 +19,6 @@ enum Enum {
      x: Error //~ ERROR
 //~^ ERROR
 //~^^ ERROR
-//~^^^ ERROR
-//~^^^^ ERROR
-//~^^^^^ ERROR
-//~^^^^^^ ERROR
-//~^^^^^^^ ERROR
-//~^^^^^^^^ ERROR
    }
 }
 
diff --git a/src/test/compile-fail/derives-span-PartialOrd-enum.rs b/src/test/compile-fail/derives-span-PartialOrd-enum.rs
index c0585999473..c4d587237a5 100644
--- a/src/test/compile-fail/derives-span-PartialOrd-enum.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-enum.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -19,12 +19,6 @@ enum Enum {
      Error //~ ERROR
 //~^ ERROR
 //~^^ ERROR
-//~^^^ ERROR
-//~^^^^ ERROR
-//~^^^^^ ERROR
-//~^^^^^^ ERROR
-//~^^^^^^^ ERROR
-//~^^^^^^^^ ERROR
      )
 }
 
diff --git a/src/test/compile-fail/derives-span-PartialOrd-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-struct.rs
index af05434af9d..e065abd9b46 100644
--- a/src/test/compile-fail/derives-span-PartialOrd-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -18,12 +18,6 @@ struct Struct {
     x: Error //~ ERROR
 //~^ ERROR
 //~^^ ERROR
-//~^^^ ERROR
-//~^^^^ ERROR
-//~^^^^^ ERROR
-//~^^^^^^ ERROR
-//~^^^^^^^ ERROR
-//~^^^^^^^^ ERROR
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs
index 1afb7bc2b4c..f2df01222b9 100644
--- a/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs
+++ b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs
@@ -1,4 +1,4 @@
-// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
 // file at the top-level directory of this distribution and at
 // http://rust-lang.org/COPYRIGHT.
 //
@@ -18,12 +18,6 @@ struct Struct(
     Error //~ ERROR
 //~^ ERROR
 //~^^ ERROR
-//~^^^ ERROR
-//~^^^^ ERROR
-//~^^^^^ ERROR
-//~^^^^^^ ERROR
-//~^^^^^^^ ERROR
-//~^^^^^^^^ ERROR
 );
 
 fn main() {}
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs b/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
index 4709ec2bc57..10c13986349 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
+++ b/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs
@@ -28,7 +28,6 @@ mod rustc_deprecated {
 
     #[rustc_deprecated = "1500"] struct S;
     //~^ ERROR stability attributes may not be used outside of the standard library
-    //~| ERROR stability attributes may not be used outside of the standard library
 
     #[rustc_deprecated = "1500"] type T = S;
     //~^ ERROR stability attributes may not be used outside of the standard library
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs b/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs
index 9627d32d42a..a6eaabf7a38 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs
+++ b/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs
@@ -28,7 +28,6 @@ mod stable {
 
     #[stable = "1300"] struct S;
     //~^ ERROR stability attributes may not be used outside of the standard library
-    //~| ERROR stability attributes may not be used outside of the standard library
 
     #[stable = "1300"] type T = S;
     //~^ ERROR stability attributes may not be used outside of the standard library
diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs b/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs
index 0708dc8f728..ff0600deb19 100644
--- a/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs
+++ b/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs
@@ -28,7 +28,6 @@ mod unstable {
 
     #[unstable = "1200"] struct S;
     //~^ ERROR stability attributes may not be used outside of the standard library
-    //~| ERROR stability attributes may not be used outside of the standard library
 
     #[unstable = "1200"] type T = S;
     //~^ ERROR stability attributes may not be used outside of the standard library
diff --git a/src/test/compile-fail/issue-17718-const-bad-values.rs b/src/test/compile-fail/issue-17718-const-bad-values.rs
index af356588ed9..17ec77d77ee 100644
--- a/src/test/compile-fail/issue-17718-const-bad-values.rs
+++ b/src/test/compile-fail/issue-17718-const-bad-values.rs
@@ -10,13 +10,11 @@
 
 const C1: &'static mut [usize] = &mut [];
 //~^ ERROR: references in constants may only refer to immutable values
-//~| ERROR: references in constants may only refer to immutable values
 
 static mut S: usize = 3;
 const C2: &'static mut usize = unsafe { &mut S };
 //~^ ERROR: constants cannot refer to statics
 //~| ERROR: references in constants may only refer to immutable values
 //~| ERROR: references in constants may only refer to immutable values
-//~| ERROR: references in constants may only refer to immutable values
 
 fn main() {}
diff --git a/src/test/compile-fail/issue-20831-debruijn.rs b/src/test/compile-fail/issue-20831-debruijn.rs
index 323cd24d8dd..3f00f561ae9 100644
--- a/src/test/compile-fail/issue-20831-debruijn.rs
+++ b/src/test/compile-fail/issue-20831-debruijn.rs
@@ -38,7 +38,6 @@ impl<'a> Publisher<'a> for MyStruct<'a> {
     fn subscribe(&mut self, t : Box<Subscriber<Input=<Self as Publisher>::Output> + 'a>) {
         // Not obvious, but there is an implicit lifetime here -------^
         //~^^ ERROR cannot infer
-        //~|  ERROR cannot infer
         //
         // The fact that `Publisher` is using an implicit lifetime is
         // what was causing the debruijn accounting to be off, so
diff --git a/src/test/compile-fail/issue-41255.rs b/src/test/compile-fail/issue-41255.rs
index a4585f7bac7..191b867e7a8 100644
--- a/src/test/compile-fail/issue-41255.rs
+++ b/src/test/compile-fail/issue-41255.rs
@@ -39,8 +39,6 @@ fn main() {
     match (x, 5) {
         (3.14, 1) => {}, //~ ERROR floating-point literals cannot be used
                          //~| WARNING hard error
-                         //~| ERROR floating-point literals cannot be used
-                         //~| WARNING hard error
         _ => {},
     }
     // Or structs
@@ -48,8 +46,6 @@ fn main() {
     match (Foo { x }) {
         Foo { x: 2.0 } => {}, //~ ERROR floating-point literals cannot be used
                               //~| WARNING hard error
-                              //~| ERROR floating-point literals cannot be used
-                              //~| WARNING hard error
         _ => {},
     }
 }
diff --git a/src/test/compile-fail/lint-stability-deprecated.rs b/src/test/compile-fail/lint-stability-deprecated.rs
index de455afbd66..9bc2c021904 100644
--- a/src/test/compile-fail/lint-stability-deprecated.rs
+++ b/src/test/compile-fail/lint-stability-deprecated.rs
@@ -107,7 +107,6 @@ mod cross_crate {
         struct S1<T: TraitWithAssociatedTypes>(T::TypeUnstable);
         struct S2<T: TraitWithAssociatedTypes>(T::TypeDeprecated);
         //~^ WARN use of deprecated item
-        //~| WARN use of deprecated item
 
         let _ = DeprecatedStruct { //~ WARN use of deprecated item
             i: 0 //~ WARN use of deprecated item
diff --git a/src/test/compile-fail/patkind-litrange-no-expr.rs b/src/test/compile-fail/patkind-litrange-no-expr.rs
index afb2cbb7db3..d57a23f26c4 100644
--- a/src/test/compile-fail/patkind-litrange-no-expr.rs
+++ b/src/test/compile-fail/patkind-litrange-no-expr.rs
@@ -28,8 +28,7 @@ enum_number!(Change {
     Pos = 1,
     Neg = -1,
     Arith = 1 + 1, //~ ERROR arbitrary expressions aren't allowed in patterns
-                   //~^ ERROR arbitrary expressions aren't allowed in patterns
-                   //~^^ ERROR only char and numeric types are allowed in range patterns
+                   //~^ ERROR only char and numeric types are allowed in range patterns
 });
 
 fn main() {}
diff --git a/src/test/compile-fail/range_traits-1.rs b/src/test/compile-fail/range_traits-1.rs
index cf5c40bd176..f1ea8b04e5a 100644
--- a/src/test/compile-fail/range_traits-1.rs
+++ b/src/test/compile-fail/range_traits-1.rs
@@ -12,75 +12,38 @@
 
 use std::ops::*;
 
-// FIXME #34229 duplicated errors
 #[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
 struct AllTheRanges {
     a: Range<usize>,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
     b: RangeTo<usize>,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
     c: RangeFrom<usize>,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
     d: RangeFull,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
     e: RangeInclusive<usize>,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
     f: RangeToInclusive<usize>,
     //~^ ERROR PartialOrd
     //~^^ ERROR Ord
-    //~^^^ ERROR binary operation
-    //~^^^^ ERROR binary operation
-    //~^^^^^ ERROR binary operation
-    //~^^^^^^ ERROR binary operation
-    //~^^^^^^^ ERROR binary operation
-    //~^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^ ERROR binary operation
-    //~^^^^^^^^^^ ERROR binary operation
+    //~^^^ ERROR binary operation `<` cannot be applied to type
+    //~^^^^ ERROR binary operation `>` cannot be applied to type
 }
 
 fn main() {}
diff --git a/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs b/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
index 1d4ffe0690d..617de2c5dfe 100644
--- a/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
+++ b/src/test/compile-fail/regions-bound-missing-bound-in-impl.rs
@@ -35,7 +35,6 @@ impl<'a, 't> Foo<'a, 't> for &'a isize {
 
     fn wrong_bound1<'b,'c,'d:'a+'c>(self, b: Inv<'b>, c: Inv<'c>, d: Inv<'d>) {
         //~^ ERROR method not compatible with trait
-        //~^^ ERROR method not compatible with trait
         //
         // Note: This is a terrible error message. It is caused
         // because, in the trait, 'b is early bound, and in the impl,
diff --git a/src/test/compile-fail/regions-close-object-into-object-5.rs b/src/test/compile-fail/regions-close-object-into-object-5.rs
index 152c65cb69b..6cbe5234ce0 100644
--- a/src/test/compile-fail/regions-close-object-into-object-5.rs
+++ b/src/test/compile-fail/regions-close-object-into-object-5.rs
@@ -31,7 +31,6 @@ fn f<'a, T, U>(v: Box<A<T>+'static>) -> Box<X+'static> {
         //~| ERROR the parameter type `T` may not live long enough
         //~| ERROR the parameter type `T` may not live long enough
         //~| ERROR the parameter type `T` may not live long enough
-        //~| ERROR the parameter type `T` may not live long enough
 }
 
 fn main() {}