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