You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tests/ui/cast_size.stderr
+6-6
Original file line number
Diff line number
Diff line change
@@ -6,27 +6,27 @@ LL | 1isize as i8;
6
6
|
7
7
= note: `-D clippy::cast-possible-truncation` implied by `-D warnings`
8
8
9
-
error: casting isize to f64 causes a loss of precision on targets with 64-bit wide pointers (isize is 64 bits wide, but f64's mantissa is only 52 bits wide)
9
+
error: casting `isize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`isize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
10
10
--> $DIR/cast_size.rs:15:5
11
11
|
12
12
LL | x0 as f64;
13
13
| ^^^^^^^^^
14
14
|
15
15
= note: `-D clippy::cast-precision-loss` implied by `-D warnings`
16
16
17
-
error: casting usize to f64 causes a loss of precision on targets with 64-bit wide pointers (usize is 64 bits wide, but f64's mantissa is only 52 bits wide)
17
+
error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
18
18
--> $DIR/cast_size.rs:16:5
19
19
|
20
20
LL | x1 as f64;
21
21
| ^^^^^^^^^
22
22
23
-
error: casting isize to f32 causes a loss of precision (isize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
23
+
error: casting `isize` to `f32` causes a loss of precision (`isize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
24
24
--> $DIR/cast_size.rs:17:5
25
25
|
26
26
LL | x0 as f32;
27
27
| ^^^^^^^^^
28
28
29
-
error: casting usize to f32 causes a loss of precision (usize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
29
+
error: casting `usize` to `f32` causes a loss of precision (`usize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
30
30
--> $DIR/cast_size.rs:18:5
31
31
|
32
32
LL | x1 as f32;
@@ -100,13 +100,13 @@ error: casting `u32` to `isize` may wrap around the value on targets with 32-bit
100
100
LL | 1u32 as isize;
101
101
| ^^^^^^^^^^^^^
102
102
103
-
error: casting i32 to f32 causes a loss of precision (i32 is 32 bits wide, but f32's mantissa is only 23 bits wide)
103
+
error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
104
104
--> $DIR/cast_size.rs:33:5
105
105
|
106
106
LL | 999_999_999 as f32;
107
107
| ^^^^^^^^^^^^^^^^^^
108
108
109
-
error: casting usize to f64 causes a loss of precision on targets with 64-bit wide pointers (usize is 64 bits wide, but f64's mantissa is only 52 bits wide)
109
+
error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
Copy file name to clipboardexpand all lines: tests/ui/cast_size_32bit.stderr
+5-5
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ LL | 1isize as i8;
6
6
|
7
7
= note: `-D clippy::cast-possible-truncation` implied by `-D warnings`
8
8
9
-
error: casting isize to f64 causes a loss of precision on targets with 64-bit wide pointers (isize is 64 bits wide, but f64's mantissa is only 52 bits wide)
9
+
error: casting `isize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`isize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
10
10
--> $DIR/cast_size_32bit.rs:15:5
11
11
|
12
12
LL | x0 as f64;
@@ -22,7 +22,7 @@ LL | x0 as f64;
22
22
|
23
23
= note: `-D clippy::cast-lossless` implied by `-D warnings`
24
24
25
-
error: casting usize to f64 causes a loss of precision on targets with 64-bit wide pointers (usize is 64 bits wide, but f64's mantissa is only 52 bits wide)
25
+
error: casting `usize` to `f64` causes a loss of precision on targets with 64-bit wide pointers (`usize` is 64 bits wide, but `f64`'s mantissa is only 52 bits wide)
26
26
--> $DIR/cast_size_32bit.rs:16:5
27
27
|
28
28
LL | x1 as f64;
@@ -34,13 +34,13 @@ error: casting `usize` to `f64` may become silently lossy if you later change th
34
34
LL | x1 as f64;
35
35
| ^^^^^^^^^ help: try: `f64::from(x1)`
36
36
37
-
error: casting isize to f32 causes a loss of precision (isize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
37
+
error: casting `isize` to `f32` causes a loss of precision (`isize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
38
38
--> $DIR/cast_size_32bit.rs:17:5
39
39
|
40
40
LL | x0 as f32;
41
41
| ^^^^^^^^^
42
42
43
-
error: casting usize to f32 causes a loss of precision (usize is 32 or 64 bits wide, but f32's mantissa is only 23 bits wide)
43
+
error: casting `usize` to `f32` causes a loss of precision (`usize` is 32 or 64 bits wide, but `f32`'s mantissa is only 23 bits wide)
44
44
--> $DIR/cast_size_32bit.rs:18:5
45
45
|
46
46
LL | x1 as f32;
@@ -114,7 +114,7 @@ error: casting `u32` to `isize` may wrap around the value on targets with 32-bit
114
114
LL | 1u32 as isize;
115
115
| ^^^^^^^^^^^^^
116
116
117
-
error: casting i32 to f32 causes a loss of precision (i32 is 32 bits wide, but f32's mantissa is only 23 bits wide)
117
+
error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
0 commit comments