]> git.proxmox.com Git - rustc.git/blob - src/test/ui/mismatched_types/binops.stderr
New upstream version 1.62.1+dfsg1
[rustc.git] / src / test / ui / mismatched_types / binops.stderr
1 error[E0277]: cannot add `Option<{integer}>` to `{integer}`
2 --> $DIR/binops.rs:2:7
3 |
4 LL | 1 + Some(1);
5 | ^ no implementation for `{integer} + Option<{integer}>`
6 |
7 = help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
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
18
19 error[E0277]: cannot subtract `Option<{integer}>` from `usize`
20 --> $DIR/binops.rs:3:16
21 |
22 LL | 2 as usize - Some(1);
23 | ^ no implementation for `usize - Option<{integer}>`
24 |
25 = help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
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
36
37 error[E0277]: cannot multiply `{integer}` by `()`
38 --> $DIR/binops.rs:4:7
39 |
40 LL | 3 * ();
41 | ^ no implementation for `{integer} * ()`
42 |
43 = help: the trait `Mul<()>` is not implemented for `{integer}`
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
54
55 error[E0277]: cannot divide `{integer}` by `&str`
56 --> $DIR/binops.rs:5:7
57 |
58 LL | 4 / "";
59 | ^ no implementation for `{integer} / &str`
60 |
61 = help: the trait `Div<&str>` is not implemented for `{integer}`
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
72
73 error[E0277]: can't compare `{integer}` with `String`
74 --> $DIR/binops.rs:6:7
75 |
76 LL | 5 < String::new();
77 | ^ no implementation for `{integer} < String` and `{integer} > String`
78 |
79 = help: the trait `PartialOrd<String>` is not implemented for `{integer}`
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
90
91 error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
92 --> $DIR/binops.rs:7:7
93 |
94 LL | 6 == Ok(1);
95 | ^^ no implementation for `{integer} == Result<{integer}, _>`
96 |
97 = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
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
108
109 error: aborting due to 6 previous errors
110
111 For more information about this error, try `rustc --explain E0277`.