about summary refs log tree commit diff
path: root/tests/ui/where-clauses
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/where-clauses')
-rw-r--r--tests/ui/where-clauses/issue-50825-1.rs2
-rw-r--r--tests/ui/where-clauses/where-clause-bounds-inconsistency.rs2
-rw-r--r--tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs2
-rw-r--r--tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr12
-rw-r--r--tests/ui/where-clauses/where-clause-method-substituion-rpass.rs2
-rw-r--r--tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr12
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed2
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs2
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.stderr6
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed1
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs1
-rw-r--r--tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.stderr4
12 files changed, 39 insertions, 9 deletions
diff --git a/tests/ui/where-clauses/issue-50825-1.rs b/tests/ui/where-clauses/issue-50825-1.rs
index ee4316029a8..2ee34ad714e 100644
--- a/tests/ui/where-clauses/issue-50825-1.rs
+++ b/tests/ui/where-clauses/issue-50825-1.rs
@@ -1,4 +1,4 @@
-// run-pass
+// check-pass
 // regression test for issue #50825
 // Make sure that the `impl` bound (): X<T = ()> is preferred over
 // the (): X bound in the where clause.
diff --git a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
index ea60fa70876..65fd2f3096c 100644
--- a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
+++ b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
@@ -1,4 +1,4 @@
-// run-pass
+// check-pass
 // pretty-expanded FIXME #23616
 
 trait Bound {
diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
index 6fc570b9b5b..a7ce0590fcd 100644
--- a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
+++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.rs
@@ -3,7 +3,7 @@
 
 // pretty-expanded FIXME #23616
 
-trait TheTrait { fn dummy(&self) { } }
+trait TheTrait { fn dummy(&self) { } } //~ WARN method `dummy` is never used
 
 impl TheTrait for &'static isize { }
 
diff --git a/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr
new file mode 100644
index 00000000000..a9fe11ea6b3
--- /dev/null
+++ b/tests/ui/where-clauses/where-clause-early-bound-lifetimes.stderr
@@ -0,0 +1,12 @@
+warning: method `dummy` is never used
+  --> $DIR/where-clause-early-bound-lifetimes.rs:6:21
+   |
+LL | trait TheTrait { fn dummy(&self) { } }
+   |       --------      ^^^^^
+   |       |
+   |       method in this trait
+   |
+   = note: `#[warn(dead_code)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
index daa3c8dd8e3..8f9c6fbff3d 100644
--- a/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
+++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.rs
@@ -2,7 +2,7 @@
 #![allow(unused_variables)]
 // pretty-expanded FIXME #23616
 
-trait Foo<T> { fn dummy(&self, arg: T) { } }
+trait Foo<T> { fn dummy(&self, arg: T) { } } //~ WARN method `dummy` is never used
 
 trait Bar<A> {
     fn method<B>(&self) where A: Foo<B>;
diff --git a/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr
new file mode 100644
index 00000000000..0d09cb9de3f
--- /dev/null
+++ b/tests/ui/where-clauses/where-clause-method-substituion-rpass.stderr
@@ -0,0 +1,12 @@
+warning: method `dummy` is never used
+  --> $DIR/where-clause-method-substituion-rpass.rs:5:19
+   |
+LL | trait Foo<T> { fn dummy(&self, arg: T) { } }
+   |       ---         ^^^^^
+   |       |
+   |       method in this trait
+   |
+   = note: `#[warn(dead_code)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed
index 2f47c0d91fa..4e1aa59aac0 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.fixed
@@ -1,6 +1,8 @@
 // check-pass
 // run-rustfix
 
+#![allow(dead_code)]
+
 trait Trait {
     // Fine.
     type Assoc where u32: Copy;
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs
index b20aa9398b5..05b2f8c82a4 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.rs
@@ -1,6 +1,8 @@
 // check-pass
 // run-rustfix
 
+#![allow(dead_code)]
+
 trait Trait {
     // Fine.
     type Assoc where u32: Copy;
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.stderr b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.stderr
index b4de051845f..6ff9d2dd73b 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.stderr
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-impl.stderr
@@ -1,5 +1,5 @@
 warning: where clause not allowed here
-  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:13:16
+  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:15:16
    |
 LL |     type Assoc where u32: Copy = ();
    |                ^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL +     type Assoc  = () where u32: Copy;
    |
 
 warning: where clause not allowed here
-  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:16:17
+  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:18:17
    |
 LL |     type Assoc2 where u32: Copy = () where i32: Copy;
    |                 ^^^^^^^^^^^^^^^
@@ -26,7 +26,7 @@ LL +     type Assoc2  = () where i32: Copy, u32: Copy;
    |
 
 warning: where clause not allowed here
-  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:24:17
+  --> $DIR/where-clause-placement-assoc-type-in-impl.rs:26:17
    |
 LL |     type Assoc2 where u32: Copy, i32: Copy = ();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed
index d171eba50b7..940e2cc8e97 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.fixed
@@ -1,6 +1,7 @@
 // check-pass
 // run-rustfix
 
+#![allow(dead_code)]
 #![feature(associated_type_defaults)]
 
 trait Trait {
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs
index 59afee65794..7001a9245a5 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.rs
@@ -1,6 +1,7 @@
 // check-pass
 // run-rustfix
 
+#![allow(dead_code)]
 #![feature(associated_type_defaults)]
 
 trait Trait {
diff --git a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.stderr b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.stderr
index a81cb8c8cd6..9e9967ef739 100644
--- a/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.stderr
+++ b/tests/ui/where-clauses/where-clause-placement-assoc-type-in-trait.stderr
@@ -1,5 +1,5 @@
 warning: where clause not allowed here
-  --> $DIR/where-clause-placement-assoc-type-in-trait.rs:8:16
+  --> $DIR/where-clause-placement-assoc-type-in-trait.rs:9:16
    |
 LL |     type Assoc where u32: Copy = ();
    |                ^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL +     type Assoc  = () where u32: Copy;
    |
 
 warning: where clause not allowed here
-  --> $DIR/where-clause-placement-assoc-type-in-trait.rs:11:17
+  --> $DIR/where-clause-placement-assoc-type-in-trait.rs:12:17
    |
 LL |     type Assoc2 where u32: Copy = () where i32: Copy;
    |                 ^^^^^^^^^^^^^^^