2017-04-26 11:42:27 -05:00
|
|
|
fn foo<T: PartialEq>(a: &T, b: T) {
|
|
|
|
a == b; //~ ERROR E0277
|
|
|
|
}
|
|
|
|
|
2022-06-05 19:37:45 -05:00
|
|
|
fn foo2<T: PartialEq>(a: &T, b: T) where {
|
|
|
|
a == b; //~ ERROR E0277
|
|
|
|
}
|
|
|
|
|
2017-04-26 11:42:27 -05:00
|
|
|
fn main() {
|
|
|
|
foo(&1, 1);
|
2022-06-05 19:37:45 -05:00
|
|
|
foo2(&1, 1);
|
2017-04-26 11:42:27 -05:00
|
|
|
}
|