diff options
Diffstat (limited to 'tests/ui/where-clauses/where-clause-bounds-inconsistency.rs')
-rw-r--r-- | tests/ui/where-clauses/where-clause-bounds-inconsistency.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs b/tests/ui/where-clauses/where-clause-bounds-inconsistency.rs new file mode 100644 index 000000000..cf7d06b61 --- /dev/null +++ b/tests/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() {} |