]> git.proxmox.com Git - rustc.git/blame - src/test/ui/suggestions/invalid-bin-op.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / suggestions / invalid-bin-op.stderr
CommitLineData
f035d41b
XL
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 |
c295e0f8
XL
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<_>`
c295e0f8
XL
14help: consider annotating `S<T>` with `#[derive(PartialEq)]`
15 |
16LL | #[derive(PartialEq)]
17 |
923072b8 18help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
04454e1e
FG
19 |
20LL | pub fn foo<T>(s: S<T>, t: S<T>) where S<T>: PartialEq {
21 | +++++++++++++++++++++
f035d41b
XL
22
23error: aborting due to previous error
24
25For more information about this error, try `rustc --explain E0369`.