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