]>
Commit | Line | Data |
---|---|---|
1 | error[E0369]: binary operation `==` cannot be applied to type `S<T>` | |
2 | --> $DIR/invalid-bin-op.rs:2:15 | |
3 | | | |
4 | LL | let _ = s == t; | |
5 | | - ^^ - S<T> | |
6 | | | | |
7 | | S<T> | |
8 | | | |
9 | note: an implementation of `PartialEq<_>` might be missing for `S<T>` | |
10 | --> $DIR/invalid-bin-op.rs:5:1 | |
11 | | | |
12 | LL | struct S<T>(T); | |
13 | | ^^^^^^^^^^^^^^^ must implement `PartialEq<_>` | |
14 | help: consider annotating `S<T>` with `#[derive(PartialEq)]` | |
15 | | | |
16 | LL | #[derive(PartialEq)] | |
17 | | | |
18 | help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement | |
19 | | | |
20 | LL | pub fn foo<T>(s: S<T>, t: S<T>) where S<T>: PartialEq { | |
21 | | +++++++++++++++++++++ | |
22 | ||
23 | error: aborting due to previous error | |
24 | ||
25 | For more information about this error, try `rustc --explain E0369`. |