rust/tests/ui/partialeq_help.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
188 B
Rust
Raw Normal View History

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
}
fn main() {
foo(&1, 1);
2022-06-05 19:37:45 -05:00
foo2(&1, 1);
}