]> git.lizzy.rs Git - rust.git/blob - src/test/ui/suggestions/derive-clone-for-eq.fixed
Rollup merge of #105955 - Nilstrieb:no-trivial-opt-wrappers-we-have-field-accesses...
[rust.git] / src / test / ui / suggestions / derive-clone-for-eq.fixed
1 // run-rustfix
2 // https://github.com/rust-lang/rust/issues/79076
3
4 use std::cmp::PartialEq;
5
6 #[derive(Clone, Eq)] //~ ERROR [E0277]
7 pub struct Struct<T: std::clone::Clone>(T);
8
9 impl<T: Clone, U> PartialEq<U> for Struct<T>
10 where
11     U: Into<Struct<T>> + Clone
12 {
13     fn eq(&self, _other: &U) -> bool {
14         todo!()
15     }
16 }
17
18 fn main() {}