1
- error: casting isize to i8 may truncate the value
1
+ error: casting ` isize` to `i8` may truncate the value
2
2
--> $DIR/cast_size_32bit.rs:12:5
3
3
|
4
4
LL | 1isize as i8;
@@ -14,7 +14,7 @@ LL | x0 as f64;
14
14
|
15
15
= note: `-D clippy::cast-precision-loss` implied by `-D warnings`
16
16
17
- error: casting isize to f64 may become silently lossy if you later change the type
17
+ error: casting ` isize` to ` f64` may become silently lossy if you later change the type
18
18
--> $DIR/cast_size_32bit.rs:15:5
19
19
|
20
20
LL | x0 as f64;
@@ -28,7 +28,7 @@ error: casting usize to f64 causes a loss of precision on targets with 64-bit wi
28
28
LL | x1 as f64;
29
29
| ^^^^^^^^^
30
30
31
- error: casting usize to f64 may become silently lossy if you later change the type
31
+ error: casting ` usize` to ` f64` may become silently lossy if you later change the type
32
32
--> $DIR/cast_size_32bit.rs:16:5
33
33
|
34
34
LL | x1 as f64;
@@ -46,69 +46,69 @@ error: casting usize to f32 causes a loss of precision (usize is 32 or 64 bits w
46
46
LL | x1 as f32;
47
47
| ^^^^^^^^^
48
48
49
- error: casting isize to i32 may truncate the value on targets with 64-bit wide pointers
49
+ error: casting ` isize` to ` i32` may truncate the value on targets with 64-bit wide pointers
50
50
--> $DIR/cast_size_32bit.rs:19:5
51
51
|
52
52
LL | 1isize as i32;
53
53
| ^^^^^^^^^^^^^
54
54
55
- error: casting isize to u32 may truncate the value on targets with 64-bit wide pointers
55
+ error: casting ` isize` to ` u32` may truncate the value on targets with 64-bit wide pointers
56
56
--> $DIR/cast_size_32bit.rs:20:5
57
57
|
58
58
LL | 1isize as u32;
59
59
| ^^^^^^^^^^^^^
60
60
61
- error: casting usize to u32 may truncate the value on targets with 64-bit wide pointers
61
+ error: casting ` usize` to ` u32` may truncate the value on targets with 64-bit wide pointers
62
62
--> $DIR/cast_size_32bit.rs:21:5
63
63
|
64
64
LL | 1usize as u32;
65
65
| ^^^^^^^^^^^^^
66
66
67
- error: casting usize to i32 may truncate the value on targets with 64-bit wide pointers
67
+ error: casting ` usize` to ` i32` may truncate the value on targets with 64-bit wide pointers
68
68
--> $DIR/cast_size_32bit.rs:22:5
69
69
|
70
70
LL | 1usize as i32;
71
71
| ^^^^^^^^^^^^^
72
72
73
- error: casting usize to i32 may wrap around the value on targets with 32-bit wide pointers
73
+ error: casting ` usize` to ` i32` may wrap around the value on targets with 32-bit wide pointers
74
74
--> $DIR/cast_size_32bit.rs:22:5
75
75
|
76
76
LL | 1usize as i32;
77
77
| ^^^^^^^^^^^^^
78
78
|
79
79
= note: `-D clippy::cast-possible-wrap` implied by `-D warnings`
80
80
81
- error: casting i64 to isize may truncate the value on targets with 32-bit wide pointers
81
+ error: casting ` i64` to ` isize` may truncate the value on targets with 32-bit wide pointers
82
82
--> $DIR/cast_size_32bit.rs:24:5
83
83
|
84
84
LL | 1i64 as isize;
85
85
| ^^^^^^^^^^^^^
86
86
87
- error: casting i64 to usize may truncate the value on targets with 32-bit wide pointers
87
+ error: casting ` i64` to ` usize` may truncate the value on targets with 32-bit wide pointers
88
88
--> $DIR/cast_size_32bit.rs:25:5
89
89
|
90
90
LL | 1i64 as usize;
91
91
| ^^^^^^^^^^^^^
92
92
93
- error: casting u64 to isize may truncate the value on targets with 32-bit wide pointers
93
+ error: casting ` u64` to ` isize` may truncate the value on targets with 32-bit wide pointers
94
94
--> $DIR/cast_size_32bit.rs:26:5
95
95
|
96
96
LL | 1u64 as isize;
97
97
| ^^^^^^^^^^^^^
98
98
99
- error: casting u64 to isize may wrap around the value on targets with 64-bit wide pointers
99
+ error: casting ` u64` to ` isize` may wrap around the value on targets with 64-bit wide pointers
100
100
--> $DIR/cast_size_32bit.rs:26:5
101
101
|
102
102
LL | 1u64 as isize;
103
103
| ^^^^^^^^^^^^^
104
104
105
- error: casting u64 to usize may truncate the value on targets with 32-bit wide pointers
105
+ error: casting ` u64` to ` usize` may truncate the value on targets with 32-bit wide pointers
106
106
--> $DIR/cast_size_32bit.rs:27:5
107
107
|
108
108
LL | 1u64 as usize;
109
109
| ^^^^^^^^^^^^^
110
110
111
- error: casting u32 to isize may wrap around the value on targets with 32-bit wide pointers
111
+ error: casting ` u32` to ` isize` may wrap around the value on targets with 32-bit wide pointers
112
112
--> $DIR/cast_size_32bit.rs:28:5
113
113
|
114
114
LL | 1u32 as isize;
@@ -120,7 +120,7 @@ error: casting i32 to f32 causes a loss of precision (i32 is 32 bits wide, but f
120
120
LL | 999_999_999 as f32;
121
121
| ^^^^^^^^^^^^^^^^^^
122
122
123
- error: casting integer literal to f64 is unnecessary
123
+ error: casting integer literal to ` f64` is unnecessary
124
124
--> $DIR/cast_size_32bit.rs:34:5
125
125
|
126
126
LL | 3_999_999_999usize as f64;
0 commit comments