about summary refs log tree commit diff
path: root/tests/ui/suggestions/partialeq_suggest_swap.rs
blob: 090f17f2fe2f4080f46ca6cc07861424332bb4ec (plain)
1
2
3
4
5
6
7
8
9
10
11
struct T(i32);

impl PartialEq<i32> for T {
    fn eq(&self, other: &i32) -> bool {
        &self.0 == other
    }
}

fn main() {
    4i32 == T(4); //~ ERROR mismatched types [E0308]
}