]> git.lizzy.rs Git - rust.git/blob - tests/ui/where-clauses/where-clause-bounds-inconsistency.rs
Modify existing bounds if they exist
[rust.git] / tests / ui / where-clauses / where-clause-bounds-inconsistency.rs
1 // run-pass
2 // pretty-expanded FIXME #23616
3
4 trait Bound {
5     fn dummy(&self) { }
6 }
7
8 trait Trait {
9     fn a<T>(&self, _: T) where T: Bound;
10     fn b<T>(&self, _: T) where T: Bound;
11     fn c<T: Bound>(&self, _: T);
12     fn d<T: Bound>(&self, _: T);
13 }
14
15 impl Trait for bool {
16     fn a<T: Bound>(&self, _: T) {}
17     //^~ This gets rejected but should be accepted
18     fn b<T>(&self, _: T) where T: Bound {}
19     fn c<T: Bound>(&self, _: T) {}
20     fn d<T>(&self, _: T) where T: Bound {}
21 }
22
23 fn main() {}