]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_types/binops.stderr
Rollup merge of #106323 - starkat99:stabilize-f16c_target_feature, r=petrochenkov
[rust.git] / tests / 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 usize as Sub<usize>>
28              <&usize as Sub<&usize>>
29              <usize as Sub<&usize>>
30              <usize as Sub>
31
32 error[E0277]: cannot multiply `{integer}` by `()`
33   --> $DIR/binops.rs:4:7
34    |
35 LL |     3 * ();
36    |       ^ no implementation for `{integer} * ()`
37    |
38    = help: the trait `Mul<()>` is not implemented for `{integer}`
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
49
50 error[E0277]: cannot divide `{integer}` by `&str`
51   --> $DIR/binops.rs:5:7
52    |
53 LL |     4 / "";
54    |       ^ no implementation for `{integer} / &str`
55    |
56    = help: the trait `Div<&str>` is not implemented for `{integer}`
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
67
68 error[E0277]: can't compare `{integer}` with `String`
69   --> $DIR/binops.rs:6:7
70    |
71 LL |     5 < String::new();
72    |       ^ no implementation for `{integer} < String` and `{integer} > String`
73    |
74    = help: the trait `PartialOrd<String>` is not implemented for `{integer}`
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
85
86 error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
87   --> $DIR/binops.rs:7:7
88    |
89 LL |     6 == Ok(1);
90    |       ^^ no implementation for `{integer} == Result<{integer}, _>`
91    |
92    = help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
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
103
104 error: aborting due to 6 previous errors
105
106 For more information about this error, try `rustc --explain E0277`.