File: binary-op-not-allowed-issue-125631.stderr

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (75 lines) | stat: -rw-r--r-- 3,029 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
error[E0369]: binary operation `==` cannot be applied to type `(std::io::Error, T1, {integer})`
  --> $DIR/binary-op-not-allowed-issue-125631.rs:8:48
   |
LL |     (Error::new(ErrorKind::Other, "1"), T1, 1) == (Error::new(ErrorKind::Other, "1"), T1, 2);
   |     ------------------------------------------ ^^ ------------------------------------------ (std::io::Error, T1, {integer})
   |     |
   |     (std::io::Error, T1, {integer})
   |
note: an implementation of `PartialEq` might be missing for `T1`
  --> $DIR/binary-op-not-allowed-issue-125631.rs:4:1
   |
LL | struct T1;
   | ^^^^^^^^^ must implement `PartialEq`
note: the foreign item type `std::io::Error` doesn't implement `PartialEq`
  --> $SRC_DIR/std/src/io/error.rs:LL:COL
   |
   = note: not implement `PartialEq`
help: consider annotating `T1` with `#[derive(PartialEq)]`
   |
LL + #[derive(PartialEq)]
LL | struct T1;
   |

error[E0369]: binary operation `==` cannot be applied to type `(std::io::Error, Thread)`
  --> $DIR/binary-op-not-allowed-issue-125631.rs:11:9
   |
LL |     (Error::new(ErrorKind::Other, "2"), thread::current())
   |     ------------------------------------------------------ (std::io::Error, Thread)
LL |         == (Error::new(ErrorKind::Other, "2"), thread::current());
   |         ^^ ------------------------------------------------------ (std::io::Error, Thread)
   |
note: the foreign item types don't implement required traits for this operation to be valid
  --> $SRC_DIR/std/src/io/error.rs:LL:COL
   |
   = note: not implement `PartialEq`
  --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
   |
   = note: not implement `PartialEq`

error[E0369]: binary operation `==` cannot be applied to type `(std::io::Error, Thread, T1, T2)`
  --> $DIR/binary-op-not-allowed-issue-125631.rs:14:9
   |
LL |     (Error::new(ErrorKind::Other, "4"), thread::current(), T1, T2)
   |     -------------------------------------------------------------- (std::io::Error, Thread, T1, T2)
LL |         == (Error::new(ErrorKind::Other, "4"), thread::current(), T1, T2);
   |         ^^ -------------------------------------------------------------- (std::io::Error, Thread, T1, T2)
   |
note: the following types would have to `impl` their required traits for this operation to be valid
  --> $DIR/binary-op-not-allowed-issue-125631.rs:4:1
   |
LL | struct T1;
   | ^^^^^^^^^ must implement `PartialEq`
LL | struct T2;
   | ^^^^^^^^^ must implement `PartialEq`
note: the foreign item types don't implement required traits for this operation to be valid
  --> $SRC_DIR/std/src/io/error.rs:LL:COL
   |
   = note: not implement `PartialEq`
  --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
   |
   = note: not implement `PartialEq`
help: consider annotating `T1` with `#[derive(PartialEq)]`
   |
LL + #[derive(PartialEq)]
LL | struct T1;
   |
help: consider annotating `T2` with `#[derive(PartialEq)]`
   |
LL + #[derive(PartialEq)]
LL | struct T2;
   |

error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0369`.