]> git.lizzy.rs Git - rust.git/blob - tests/ui/numbers-arithmetic/suggest-float-literal.stderr
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / 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              <&f32 as Add<&f32>>
11              <f32 as Add<&f32>>
12              <f32 as Add>
13 help: consider using a floating-point literal by writing it with `.0`
14    |
15 LL |     x + 100.0
16    |            ++
17
18 error[E0277]: cannot add `{integer}` to `f64`
19   --> $DIR/suggest-float-literal.rs:10:7
20    |
21 LL |     x + 100
22    |       ^ no implementation for `f64 + {integer}`
23    |
24    = help: the trait `Add<{integer}>` is not implemented for `f64`
25    = help: the following other types implement trait `Add<Rhs>`:
26              <&'a f64 as Add<f64>>
27              <&f64 as Add<&f64>>
28              <f64 as Add<&f64>>
29              <f64 as Add>
30 help: consider using a floating-point literal by writing it with `.0`
31    |
32 LL |     x + 100.0
33    |            ++
34
35 error[E0277]: cannot subtract `{integer}` from `f32`
36   --> $DIR/suggest-float-literal.rs:14:7
37    |
38 LL |     x - 100
39    |       ^ no implementation for `f32 - {integer}`
40    |
41    = help: the trait `Sub<{integer}>` is not implemented for `f32`
42    = help: the following other types implement trait `Sub<Rhs>`:
43              <&'a f32 as Sub<f32>>
44              <&f32 as Sub<&f32>>
45              <f32 as Sub<&f32>>
46              <f32 as Sub>
47 help: consider using a floating-point literal by writing it with `.0`
48    |
49 LL |     x - 100.0
50    |            ++
51
52 error[E0277]: cannot subtract `{integer}` from `f64`
53   --> $DIR/suggest-float-literal.rs:18:7
54    |
55 LL |     x - 100
56    |       ^ no implementation for `f64 - {integer}`
57    |
58    = help: the trait `Sub<{integer}>` is not implemented for `f64`
59    = help: the following other types implement trait `Sub<Rhs>`:
60              <&'a f64 as Sub<f64>>
61              <&f64 as Sub<&f64>>
62              <f64 as Sub<&f64>>
63              <f64 as Sub>
64 help: consider using a floating-point literal by writing it with `.0`
65    |
66 LL |     x - 100.0
67    |            ++
68
69 error[E0277]: cannot multiply `f32` by `{integer}`
70   --> $DIR/suggest-float-literal.rs:22:7
71    |
72 LL |     x * 100
73    |       ^ no implementation for `f32 * {integer}`
74    |
75    = help: the trait `Mul<{integer}>` is not implemented for `f32`
76    = help: the following other types implement trait `Mul<Rhs>`:
77              <&'a f32 as Mul<f32>>
78              <&f32 as Mul<&f32>>
79              <f32 as Mul<&f32>>
80              <f32 as Mul>
81 help: consider using a floating-point literal by writing it with `.0`
82    |
83 LL |     x * 100.0
84    |            ++
85
86 error[E0277]: cannot multiply `f64` by `{integer}`
87   --> $DIR/suggest-float-literal.rs:26:7
88    |
89 LL |     x * 100
90    |       ^ no implementation for `f64 * {integer}`
91    |
92    = help: the trait `Mul<{integer}>` is not implemented for `f64`
93    = help: the following other types implement trait `Mul<Rhs>`:
94              <&'a f64 as Mul<f64>>
95              <&f64 as Mul<&f64>>
96              <f64 as Mul<&f64>>
97              <f64 as Mul>
98 help: consider using a floating-point literal by writing it with `.0`
99    |
100 LL |     x * 100.0
101    |            ++
102
103 error[E0277]: cannot divide `f32` by `{integer}`
104   --> $DIR/suggest-float-literal.rs:30:7
105    |
106 LL |     x / 100
107    |       ^ no implementation for `f32 / {integer}`
108    |
109    = help: the trait `Div<{integer}>` is not implemented for `f32`
110    = help: the following other types implement trait `Div<Rhs>`:
111              <&'a f32 as Div<f32>>
112              <&f32 as Div<&f32>>
113              <f32 as Div<&f32>>
114              <f32 as Div>
115 help: consider using a floating-point literal by writing it with `.0`
116    |
117 LL |     x / 100.0
118    |            ++
119
120 error[E0277]: cannot divide `f64` by `{integer}`
121   --> $DIR/suggest-float-literal.rs:34:7
122    |
123 LL |     x / 100
124    |       ^ no implementation for `f64 / {integer}`
125    |
126    = help: the trait `Div<{integer}>` is not implemented for `f64`
127    = help: the following other types implement trait `Div<Rhs>`:
128              <&'a f64 as Div<f64>>
129              <&f64 as Div<&f64>>
130              <f64 as Div<&f64>>
131              <f64 as Div>
132 help: consider using a floating-point literal by writing it with `.0`
133    |
134 LL |     x / 100.0
135    |            ++
136
137 error: aborting due to 8 previous errors
138
139 For more information about this error, try `rustc --explain E0277`.