]> git.lizzy.rs Git - rust.git/blob - tests/ui/where-clauses/auxiliary/where_clauses_xc.rs
Rollup merge of #106726 - cmorin6:fix-comment-typos, r=Nilstrieb
[rust.git] / tests / ui / where-clauses / auxiliary / where_clauses_xc.rs
1 pub trait Equal {
2     fn equal(&self, other: &Self) -> bool;
3     fn equals<T,U>(&self, this: &T, that: &T, x: &U, y: &U) -> bool
4             where T: Eq, U: Eq;
5 }
6
7 impl<T> Equal for T where T: Eq {
8     fn equal(&self, other: &T) -> bool {
9         self == other
10     }
11     fn equals<U,X>(&self, this: &U, other: &U, x: &X, y: &X) -> bool
12             where U: Eq, X: Eq {
13         this == other && x == y
14     }
15 }
16
17 pub fn equal<T>(x: &T, y: &T) -> bool where T: Eq {
18     x == y
19 }