mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
12 lines
188 B
Rust
12 lines
188 B
Rust
fn foo<T: PartialEq>(a: &T, b: T) {
|
|
a == b; //~ ERROR E0277
|
|
}
|
|
|
|
fn foo2<T: PartialEq>(a: &T, b: T) where {
|
|
a == b; //~ ERROR E0277
|
|
}
|
|
|
|
fn main() {
|
|
foo(&1, 1);
|
|
foo2(&1, 1);
|
|
}
|