summaryrefslogtreecommitdiffstats
path: root/tests/ui/suggestions/derive-clone-for-eq.rs
blob: 15c0d4659fbbe0c470580b09ea273c1288101bc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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() {}