mirror of
https://github.com/openharmony/third_party_rust_rust.git
synced 2026-08-28 04:10:09 -04:00
13 lines
188 B
Rust
13 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);
|
|
}
|