mirror of
https://github.com/rust-lang/rust.git
synced 2025-09-29 15:48:52 +00:00
12 lines
185 B
Rust
12 lines
185 B
Rust
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]
|
|
}
|