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

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

12 lines
258 B
Rust
Raw Normal View History

2025-02-17 21:19:36 +08:00
struct T(String);
impl PartialEq<String> for T {
fn eq(&self, other: &String) -> bool {
&self.0 == other
}
}
fn main() {
String::from("Girls Band Cry") == T(String::from("Girls Band Cry")); //~ can't compare `String` with `T` [E0277]
}