summaryrefslogtreecommitdiffstats
path: root/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs')
-rw-r--r--src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs b/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs
new file mode 100644
index 000000000..cf7d06b61
--- /dev/null
+++ b/src/test/ui/where-clauses/where-clause-bounds-inconsistency.rs
@@ -0,0 +1,23 @@
+// run-pass
+// pretty-expanded FIXME #23616
+
+trait Bound {
+ fn dummy(&self) { }
+}
+
+trait Trait {
+ fn a<T>(&self, _: T) where T: Bound;
+ fn b<T>(&self, _: T) where T: Bound;
+ fn c<T: Bound>(&self, _: T);
+ fn d<T: Bound>(&self, _: T);
+}
+
+impl Trait for bool {
+ fn a<T: Bound>(&self, _: T) {}
+ //^~ This gets rejected but should be accepted
+ fn b<T>(&self, _: T) where T: Bound {}
+ fn c<T: Bound>(&self, _: T) {}
+ fn d<T>(&self, _: T) where T: Bound {}
+}
+
+fn main() {}