Skip to content

Commit ff77a3e

Browse files
committed
(Try to) fix the 32-bit tests
1 parent f51d512 commit ff77a3e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/ui/cast_size.r32bit.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL - 1isize as i8;
1313
LL + i8::try_from(1isize);
1414
|
1515

16-
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)
16+
error: casting `isize` to `f32` may cause a loss of precision (`isize` can be up to 64 bits wide depending on the target architecture, but `f32`'s mantissa is only 23 bits wide)
1717
--> tests/ui/cast_size.rs:24:5
1818
|
1919
LL | x0 as f32;
@@ -22,19 +22,19 @@ LL | x0 as f32;
2222
= note: `-D clippy::cast-precision-loss` implied by `-D warnings`
2323
= help: to override `-D warnings` add `#[allow(clippy::cast_precision_loss)]`
2424

25-
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)
25+
error: casting `usize` to `f32` may cause a loss of precision (`usize` can be up to 64 bits wide depending on the target architecture, but `f32`'s mantissa is only 23 bits wide)
2626
--> tests/ui/cast_size.rs:26:5
2727
|
2828
LL | x1 as f32;
2929
| ^^^^^^^^^
3030

31-
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)
31+
error: casting `isize` to `f64` may cause 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)
3232
--> tests/ui/cast_size.rs:28:5
3333
|
3434
LL | x0 as f64;
3535
| ^^^^^^^^^
3636

37-
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)
37+
error: casting `usize` to `f64` may cause 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)
3838
--> tests/ui/cast_size.rs:30:5
3939
|
4040
LL | x1 as f64;
@@ -165,13 +165,13 @@ error: casting `u32` to `isize` may wrap around the value on targets with 32-bit
165165
LL | 1u32 as isize;
166166
| ^^^^^^^^^^^^^
167167

168-
error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
168+
error: casting `i32` to `f32` may cause a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
169169
--> tests/ui/cast_size.rs:61:5
170170
|
171171
LL | 999_999_999 as f32;
172172
| ^^^^^^^^^^^^^^^^^^
173173

174-
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)
174+
error: casting `usize` to `f64` may cause 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)
175175
--> tests/ui/cast_size.rs:63:5
176176
|
177177
LL | 9_999_999_999_999_999usize as f64;

0 commit comments

Comments
 (0)