summary refs log tree commit diff
path: root/src/test/ui/compare-method
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2016-10-12 16:38:58 -0400
committerNiko Matsakis <niko@alum.mit.edu>2016-11-01 14:08:56 -0400
commitddabd509a862da4bd0e8cfb86baf598f45c2383b (patch)
tree8a33fa9449d842a78c69ce2292f75970ee7f4d52 /src/test/ui/compare-method
parentf6526512751bfe29a0bf9535bc41db2076ff57ba (diff)
downloadrust-ddabd509a862da4bd0e8cfb86baf598f45c2383b.tar.gz
rust-ddabd509a862da4bd0e8cfb86baf598f45c2383b.zip
compare-method lint
Diffstat (limited to 'src/test/ui/compare-method')
-rw-r--r--src/test/ui/compare-method/proj-outlives-region.rs1
-rw-r--r--src/test/ui/compare-method/proj-outlives-region.stderr14
-rw-r--r--src/test/ui/compare-method/proj-outlives-region.stdout0
-rw-r--r--src/test/ui/compare-method/region-unrelated.rs1
-rw-r--r--src/test/ui/compare-method/region-unrelated.stderr14
-rw-r--r--src/test/ui/compare-method/region-unrelated.stdout0
-rw-r--r--src/test/ui/compare-method/region.rs1
-rw-r--r--src/test/ui/compare-method/region.stderr14
-rw-r--r--src/test/ui/compare-method/region.stdout0
9 files changed, 36 insertions, 9 deletions
diff --git a/src/test/ui/compare-method/proj-outlives-region.rs b/src/test/ui/compare-method/proj-outlives-region.rs
index 631da7140ea..54cfe4be9c1 100644
--- a/src/test/ui/compare-method/proj-outlives-region.rs
+++ b/src/test/ui/compare-method/proj-outlives-region.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![allow(dead_code)]
+#![deny(extra_requirement_in_impl)]
 
 // Test that we elaborate `Type: 'region` constraints and infer various important things.
 
diff --git a/src/test/ui/compare-method/proj-outlives-region.stderr b/src/test/ui/compare-method/proj-outlives-region.stderr
index b36d64e3b9c..f5907c0ae59 100644
--- a/src/test/ui/compare-method/proj-outlives-region.stderr
+++ b/src/test/ui/compare-method/proj-outlives-region.stderr
@@ -1,11 +1,19 @@
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/proj-outlives-region.rs:21:5
+  --> $DIR/proj-outlives-region.rs:22:5
    |
-16 |     fn foo() where T: 'a;
+17 |     fn foo() where T: 'a;
    |     --------------------- definition of `foo` from trait
 ...
-21 |     fn foo() where U: 'a { } //~ ERROR E0276
+22 |     fn foo() where U: 'a { } //~ ERROR E0276
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `U: 'a`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #18937 <https://github.com/rust-lang/rust/issues/18937>
+note: lint level defined here
+  --> $DIR/proj-outlives-region.rs:12:9
+   |
+12 | #![deny(extra_requirement_in_impl)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/compare-method/proj-outlives-region.stdout b/src/test/ui/compare-method/proj-outlives-region.stdout
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/ui/compare-method/proj-outlives-region.stdout
diff --git a/src/test/ui/compare-method/region-unrelated.rs b/src/test/ui/compare-method/region-unrelated.rs
index 3c11b8bb1ef..8f79b30bd5f 100644
--- a/src/test/ui/compare-method/region-unrelated.rs
+++ b/src/test/ui/compare-method/region-unrelated.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![allow(dead_code)]
+#![deny(extra_requirement_in_impl)]
 
 // Test that we elaborate `Type: 'region` constraints and infer various important things.
 
diff --git a/src/test/ui/compare-method/region-unrelated.stderr b/src/test/ui/compare-method/region-unrelated.stderr
index fb3511867e5..b8084c4a2f3 100644
--- a/src/test/ui/compare-method/region-unrelated.stderr
+++ b/src/test/ui/compare-method/region-unrelated.stderr
@@ -1,11 +1,19 @@
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/region-unrelated.rs:21:5
+  --> $DIR/region-unrelated.rs:22:5
    |
-16 |     fn foo() where T: 'a;
+17 |     fn foo() where T: 'a;
    |     --------------------- definition of `foo` from trait
 ...
-21 |     fn foo() where V: 'a { }
+22 |     fn foo() where V: 'a { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `V: 'a`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #18937 <https://github.com/rust-lang/rust/issues/18937>
+note: lint level defined here
+  --> $DIR/region-unrelated.rs:12:9
+   |
+12 | #![deny(extra_requirement_in_impl)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/compare-method/region-unrelated.stdout b/src/test/ui/compare-method/region-unrelated.stdout
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/ui/compare-method/region-unrelated.stdout
diff --git a/src/test/ui/compare-method/region.rs b/src/test/ui/compare-method/region.rs
index 1942ca9504c..ef6a642143c 100644
--- a/src/test/ui/compare-method/region.rs
+++ b/src/test/ui/compare-method/region.rs
@@ -9,6 +9,7 @@
 // except according to those terms.
 
 #![allow(dead_code)]
+#![deny(extra_requirement_in_impl)]
 
 // Test that we elaborate `Type: 'region` constraints and infer various important things.
 
diff --git a/src/test/ui/compare-method/region.stderr b/src/test/ui/compare-method/region.stderr
index 78e00e066bd..787433137b9 100644
--- a/src/test/ui/compare-method/region.stderr
+++ b/src/test/ui/compare-method/region.stderr
@@ -1,11 +1,19 @@
 error[E0276]: impl has stricter requirements than trait
-  --> $DIR/region.rs:21:5
+  --> $DIR/region.rs:22:5
    |
-16 |     fn foo();
+17 |     fn foo();
    |     --------- definition of `foo` from trait
 ...
-21 |     fn foo() where 'a: 'b { }
+22 |     fn foo() where 'a: 'b { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ impl has extra requirement `'a: 'b`
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #18937 <https://github.com/rust-lang/rust/issues/18937>
+note: lint level defined here
+  --> $DIR/region.rs:12:9
+   |
+12 | #![deny(extra_requirement_in_impl)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/compare-method/region.stdout b/src/test/ui/compare-method/region.stdout
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/src/test/ui/compare-method/region.stdout