Files
rust/tests/ui/suggestions/partialeq_suggest_swap.rs

12 lines
179 B
Rust
Raw Normal View History

2024-11-05 10:09:34 +08:00
struct T(i32);
impl PartialEq<i32> for T {
fn eq(&self, other: &i32) -> bool {
&self.0 == other
}
}
fn main() {
4i32 == T(4); //~ mismatched types [E0308]
}