rust/tests/ui/suggestions/derive-clone-for-eq.rs
2023-01-11 09:32:08 +00:00

19 lines
318 B
Rust

// run-rustfix
// https://github.com/rust-lang/rust/issues/79076
use std::cmp::PartialEq;
#[derive(Clone, Eq)] //~ ERROR [E0277]
pub struct Struct<T>(T);
impl<T: Clone, U> PartialEq<U> for Struct<T>
where
U: Into<Struct<T>> + Clone
{
fn eq(&self, _other: &U) -> bool {
todo!()
}
}
fn main() {}