]> git.lizzy.rs Git - rust.git/blob - src/test/ui/numbers-arithmetic/suggest-float-literal.stderr
Auto merge of #101893 - oli-obk:lift_derive, r=lcnr
[rust.git] / src / test / ui / numbers-arithmetic / suggest-float-literal.stderr
1 error[E0277]: cannot add `{integer}` to `f32`
2   --> $DIR/suggest-float-literal.rs:6:7
3    |
4 LL |     x + 100
5    |       ^ no implementation for `f32 + {integer}`
6    |
7    = help: the trait `Add<{integer}>` is not implemented for `f32`
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 help: consider using a floating-point literal by writing it with `.0`
19    |
20 LL |     x + 100.0
21    |            ++
22
23 error[E0277]: cannot add `{integer}` to `f64`
24   --> $DIR/suggest-float-literal.rs:10:7
25    |
26 LL |     x + 100
27    |       ^ no implementation for `f64 + {integer}`
28    |
29    = help: the trait `Add<{integer}>` is not implemented for `f64`
30    = help: the following other types implement trait `Add<Rhs>`:
31              <&'a f32 as Add<f32>>
32              <&'a f64 as Add<f64>>
33              <&'a i128 as Add<i128>>
34              <&'a i16 as Add<i16>>
35              <&'a i32 as Add<i32>>
36              <&'a i64 as Add<i64>>
37              <&'a i8 as Add<i8>>
38              <&'a isize as Add<isize>>
39            and 48 others
40 help: consider using a floating-point literal by writing it with `.0`
41    |
42 LL |     x + 100.0
43    |            ++
44
45 error[E0277]: cannot subtract `{integer}` from `f32`
46   --> $DIR/suggest-float-literal.rs:14:7
47    |
48 LL |     x - 100
49    |       ^ no implementation for `f32 - {integer}`
50    |
51    = help: the trait `Sub<{integer}>` is not implemented for `f32`
52    = help: the following other types implement trait `Sub<Rhs>`:
53              <&'a f32 as Sub<f32>>
54              <&'a f64 as Sub<f64>>
55              <&'a i128 as Sub<i128>>
56              <&'a i16 as Sub<i16>>
57              <&'a i32 as Sub<i32>>
58              <&'a i64 as Sub<i64>>
59              <&'a i8 as Sub<i8>>
60              <&'a isize as Sub<isize>>
61            and 48 others
62 help: consider using a floating-point literal by writing it with `.0`
63    |
64 LL |     x - 100.0
65    |            ++
66
67 error[E0277]: cannot subtract `{integer}` from `f64`
68   --> $DIR/suggest-float-literal.rs:18:7
69    |
70 LL |     x - 100
71    |       ^ no implementation for `f64 - {integer}`
72    |
73    = help: the trait `Sub<{integer}>` is not implemented for `f64`
74    = help: the following other types implement trait `Sub<Rhs>`:
75              <&'a f32 as Sub<f32>>
76              <&'a f64 as Sub<f64>>
77              <&'a i128 as Sub<i128>>
78              <&'a i16 as Sub<i16>>
79              <&'a i32 as Sub<i32>>
80              <&'a i64 as Sub<i64>>
81              <&'a i8 as Sub<i8>>
82              <&'a isize as Sub<isize>>
83            and 48 others
84 help: consider using a floating-point literal by writing it with `.0`
85    |
86 LL |     x - 100.0
87    |            ++
88
89 error[E0277]: cannot multiply `f32` by `{integer}`
90   --> $DIR/suggest-float-literal.rs:22:7
91    |
92 LL |     x * 100
93    |       ^ no implementation for `f32 * {integer}`
94    |
95    = help: the trait `Mul<{integer}>` is not implemented for `f32`
96    = help: the following other types implement trait `Mul<Rhs>`:
97              <&'a f32 as Mul<f32>>
98              <&'a f64 as Mul<f64>>
99              <&'a i128 as Mul<i128>>
100              <&'a i16 as Mul<i16>>
101              <&'a i32 as Mul<i32>>
102              <&'a i64 as Mul<i64>>
103              <&'a i8 as Mul<i8>>
104              <&'a isize as Mul<isize>>
105            and 49 others
106 help: consider using a floating-point literal by writing it with `.0`
107    |
108 LL |     x * 100.0
109    |            ++
110
111 error[E0277]: cannot multiply `f64` by `{integer}`
112   --> $DIR/suggest-float-literal.rs:26:7
113    |
114 LL |     x * 100
115    |       ^ no implementation for `f64 * {integer}`
116    |
117    = help: the trait `Mul<{integer}>` is not implemented for `f64`
118    = help: the following other types implement trait `Mul<Rhs>`:
119              <&'a f32 as Mul<f32>>
120              <&'a f64 as Mul<f64>>
121              <&'a i128 as Mul<i128>>
122              <&'a i16 as Mul<i16>>
123              <&'a i32 as Mul<i32>>
124              <&'a i64 as Mul<i64>>
125              <&'a i8 as Mul<i8>>
126              <&'a isize as Mul<isize>>
127            and 49 others
128 help: consider using a floating-point literal by writing it with `.0`
129    |
130 LL |     x * 100.0
131    |            ++
132
133 error[E0277]: cannot divide `f32` by `{integer}`
134   --> $DIR/suggest-float-literal.rs:30:7
135    |
136 LL |     x / 100
137    |       ^ no implementation for `f32 / {integer}`
138    |
139    = help: the trait `Div<{integer}>` is not implemented for `f32`
140    = help: the following other types implement trait `Div<Rhs>`:
141              <&'a f32 as Div<f32>>
142              <&'a f64 as Div<f64>>
143              <&'a i128 as Div<i128>>
144              <&'a i16 as Div<i16>>
145              <&'a i32 as Div<i32>>
146              <&'a i64 as Div<i64>>
147              <&'a i8 as Div<i8>>
148              <&'a isize as Div<isize>>
149            and 54 others
150 help: consider using a floating-point literal by writing it with `.0`
151    |
152 LL |     x / 100.0
153    |            ++
154
155 error[E0277]: cannot divide `f64` by `{integer}`
156   --> $DIR/suggest-float-literal.rs:34:7
157    |
158 LL |     x / 100
159    |       ^ no implementation for `f64 / {integer}`
160    |
161    = help: the trait `Div<{integer}>` is not implemented for `f64`
162    = help: the following other types implement trait `Div<Rhs>`:
163              <&'a f32 as Div<f32>>
164              <&'a f64 as Div<f64>>
165              <&'a i128 as Div<i128>>
166              <&'a i16 as Div<i16>>
167              <&'a i32 as Div<i32>>
168              <&'a i64 as Div<i64>>
169              <&'a i8 as Div<i8>>
170              <&'a isize as Div<isize>>
171            and 54 others
172 help: consider using a floating-point literal by writing it with `.0`
173    |
174 LL |     x / 100.0
175    |            ++
176
177 error: aborting due to 8 previous errors
178
179 For more information about this error, try `rustc --explain E0277`.