]> git.proxmox.com Git - rustc.git/blame - src/test/ui/mismatched_types/binops.stderr
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / binops.stderr
CommitLineData
1b1a35ee 1error[E0277]: cannot add `Option<{integer}>` to `{integer}`
0731742a 2 --> $DIR/binops.rs:2:7
cc61c64b 3 |
532ac7d7 4LL | 1 + Some(1);
1b1a35ee 5 | ^ no implementation for `{integer} + Option<{integer}>`
cc61c64b 6 |
1b1a35ee 7 = help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
04454e1e
FG
8 = help: the following other types implement trait `Add<Rhs>`:
9 <&'a f32 as Add<f32>>
10 <&'a f64 as Add<f64>>
11 <&'a i128 as Add<i128>>
12 <&'a i16 as Add<i16>>
13 <&'a i32 as Add<i32>>
14 <&'a i64 as Add<i64>>
15 <&'a i8 as Add<i8>>
16 <&'a isize as Add<isize>>
17 and 48 others
cc61c64b 18
1b1a35ee 19error[E0277]: cannot subtract `Option<{integer}>` from `usize`
0731742a 20 --> $DIR/binops.rs:3:16
cc61c64b 21 |
532ac7d7 22LL | 2 as usize - Some(1);
1b1a35ee 23 | ^ no implementation for `usize - Option<{integer}>`
cc61c64b 24 |
1b1a35ee 25 = help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
04454e1e 26 = help: the following other types implement trait `Sub<Rhs>`:
487cf647
FG
27 <&'a usize as Sub<usize>>
28 <&usize as Sub<&usize>>
29 <usize as Sub<&usize>>
30 <usize as Sub>
cc61c64b 31
29967ef6 32error[E0277]: cannot multiply `{integer}` by `()`
0731742a 33 --> $DIR/binops.rs:4:7
cc61c64b 34 |
532ac7d7 35LL | 3 * ();
7cac9316 36 | ^ no implementation for `{integer} * ()`
cc61c64b 37 |
1b1a35ee 38 = help: the trait `Mul<()>` is not implemented for `{integer}`
04454e1e
FG
39 = help: the following other types implement trait `Mul<Rhs>`:
40 <&'a f32 as Mul<f32>>
41 <&'a f64 as Mul<f64>>
42 <&'a i128 as Mul<i128>>
43 <&'a i16 as Mul<i16>>
44 <&'a i32 as Mul<i32>>
45 <&'a i64 as Mul<i64>>
46 <&'a i8 as Mul<i8>>
47 <&'a isize as Mul<isize>>
48 and 49 others
cc61c64b 49
2c00a5a8 50error[E0277]: cannot divide `{integer}` by `&str`
0731742a 51 --> $DIR/binops.rs:5:7
cc61c64b 52 |
532ac7d7 53LL | 4 / "";
7cac9316 54 | ^ no implementation for `{integer} / &str`
cc61c64b 55 |
1b1a35ee 56 = help: the trait `Div<&str>` is not implemented for `{integer}`
04454e1e
FG
57 = help: the following other types implement trait `Div<Rhs>`:
58 <&'a f32 as Div<f32>>
59 <&'a f64 as Div<f64>>
60 <&'a i128 as Div<i128>>
61 <&'a i16 as Div<i16>>
62 <&'a i32 as Div<i32>>
63 <&'a i64 as Div<i64>>
64 <&'a i8 as Div<i8>>
65 <&'a isize as Div<isize>>
66 and 54 others
cc61c64b 67
1b1a35ee 68error[E0277]: can't compare `{integer}` with `String`
0731742a 69 --> $DIR/binops.rs:6:7
cc61c64b 70 |
532ac7d7 71LL | 5 < String::new();
1b1a35ee 72 | ^ no implementation for `{integer} < String` and `{integer} > String`
cc61c64b 73 |
1b1a35ee 74 = help: the trait `PartialOrd<String>` is not implemented for `{integer}`
04454e1e
FG
75 = help: the following other types implement trait `PartialOrd<Rhs>`:
76 f32
77 f64
78 i128
79 i16
80 i32
81 i64
82 i8
83 isize
84 and 6 others
cc61c64b 85
6a06907d 86error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
0731742a 87 --> $DIR/binops.rs:7:7
cc61c64b 88 |
532ac7d7 89LL | 6 == Ok(1);
6a06907d 90 | ^^ no implementation for `{integer} == Result<{integer}, _>`
cc61c64b 91 |
6a06907d 92 = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
04454e1e
FG
93 = help: the following other types implement trait `PartialEq<Rhs>`:
94 f32
95 f64
96 i128
97 i16
98 i32
99 i64
100 i8
101 isize
102 and 6 others
cc61c64b 103
041b39d2 104error: aborting due to 6 previous errors
cc61c64b 105
0531ce1d 106For more information about this error, try `rustc --explain E0277`.