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.32bit.stderr
+19-19
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
error: casting `isize` to `i8` may truncate the value
2
-
--> tests/ui/cast_size.rs:15:5
2
+
--> tests/ui/cast_size.rs:17:5
3
3
|
4
4
LL | 1isize as i8;
5
5
| ^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | i8::try_from(1isize);
13
13
| ~~~~~~~~~~~~~~~~~~~~
14
14
15
15
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
-
--> tests/ui/cast_size.rs:22:5
16
+
--> tests/ui/cast_size.rs:24:5
17
17
|
18
18
LL | x0 as f32;
19
19
| ^^^^^^^^^
@@ -22,25 +22,25 @@ LL | x0 as f32;
22
22
= help: to override `-D warnings` add `#[allow(clippy::cast_precision_loss)]`
23
23
24
24
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
-
--> tests/ui/cast_size.rs:24:5
25
+
--> tests/ui/cast_size.rs:26:5
26
26
|
27
27
LL | x1 as f32;
28
28
| ^^^^^^^^^
29
29
30
30
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
-
--> tests/ui/cast_size.rs:26:5
31
+
--> tests/ui/cast_size.rs:28:5
32
32
|
33
33
LL | x0 as f64;
34
34
| ^^^^^^^^^
35
35
36
36
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
-
--> tests/ui/cast_size.rs:28:5
37
+
--> tests/ui/cast_size.rs:30:5
38
38
|
39
39
LL | x1 as f64;
40
40
| ^^^^^^^^^
41
41
42
42
error: casting `isize` to `i32` may truncate the value on targets with 64-bit wide pointers
43
-
--> tests/ui/cast_size.rs:33:5
43
+
--> tests/ui/cast_size.rs:35:5
44
44
|
45
45
LL | 1isize as i32;
46
46
| ^^^^^^^^^^^^^
@@ -52,7 +52,7 @@ LL | i32::try_from(1isize);
52
52
| ~~~~~~~~~~~~~~~~~~~~~
53
53
54
54
error: casting `isize` to `u32` may truncate the value on targets with 64-bit wide pointers
55
-
--> tests/ui/cast_size.rs:35:5
55
+
--> tests/ui/cast_size.rs:37:5
56
56
|
57
57
LL | 1isize as u32;
58
58
| ^^^^^^^^^^^^^
@@ -64,7 +64,7 @@ LL | u32::try_from(1isize);
64
64
| ~~~~~~~~~~~~~~~~~~~~~
65
65
66
66
error: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
67
-
--> tests/ui/cast_size.rs:37:5
67
+
--> tests/ui/cast_size.rs:39:5
68
68
|
69
69
LL | 1usize as u32;
70
70
| ^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL | u32::try_from(1usize);
76
76
| ~~~~~~~~~~~~~~~~~~~~~
77
77
78
78
error: casting `usize` to `i32` may truncate the value on targets with 64-bit wide pointers
79
-
--> tests/ui/cast_size.rs:39:5
79
+
--> tests/ui/cast_size.rs:41:5
80
80
|
81
81
LL | 1usize as i32;
82
82
| ^^^^^^^^^^^^^
@@ -88,7 +88,7 @@ LL | i32::try_from(1usize);
88
88
| ~~~~~~~~~~~~~~~~~~~~~
89
89
90
90
error: casting `usize` to `i32` may wrap around the value on targets with 32-bit wide pointers
91
-
--> tests/ui/cast_size.rs:39:5
91
+
--> tests/ui/cast_size.rs:41:5
92
92
|
93
93
LL | 1usize as i32;
94
94
| ^^^^^^^^^^^^^
@@ -97,7 +97,7 @@ LL | 1usize as i32;
97
97
= help: to override `-D warnings` add `#[allow(clippy::cast_possible_wrap)]`
98
98
99
99
error: casting `i64` to `isize` may truncate the value on targets with 32-bit wide pointers
100
-
--> tests/ui/cast_size.rs:42:5
100
+
--> tests/ui/cast_size.rs:44:5
101
101
|
102
102
LL | 1i64 as isize;
103
103
| ^^^^^^^^^^^^^
@@ -109,7 +109,7 @@ LL | isize::try_from(1i64);
109
109
| ~~~~~~~~~~~~~~~~~~~~~
110
110
111
111
error: casting `i64` to `usize` may truncate the value on targets with 32-bit wide pointers
112
-
--> tests/ui/cast_size.rs:44:5
112
+
--> tests/ui/cast_size.rs:46:5
113
113
|
114
114
LL | 1i64 as usize;
115
115
| ^^^^^^^^^^^^^
@@ -121,7 +121,7 @@ LL | usize::try_from(1i64);
121
121
| ~~~~~~~~~~~~~~~~~~~~~
122
122
123
123
error: casting `u64` to `isize` may truncate the value on targets with 32-bit wide pointers
124
-
--> tests/ui/cast_size.rs:46:5
124
+
--> tests/ui/cast_size.rs:48:5
125
125
|
126
126
LL | 1u64 as isize;
127
127
| ^^^^^^^^^^^^^
@@ -133,13 +133,13 @@ LL | isize::try_from(1u64);
133
133
| ~~~~~~~~~~~~~~~~~~~~~
134
134
135
135
error: casting `u64` to `isize` may wrap around the value on targets with 64-bit wide pointers
136
-
--> tests/ui/cast_size.rs:46:5
136
+
--> tests/ui/cast_size.rs:48:5
137
137
|
138
138
LL | 1u64 as isize;
139
139
| ^^^^^^^^^^^^^
140
140
141
141
error: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers
142
-
--> tests/ui/cast_size.rs:49:5
142
+
--> tests/ui/cast_size.rs:51:5
143
143
|
144
144
LL | 1u64 as usize;
145
145
| ^^^^^^^^^^^^^
@@ -151,25 +151,25 @@ LL | usize::try_from(1u64);
151
151
| ~~~~~~~~~~~~~~~~~~~~~
152
152
153
153
error: casting `u32` to `isize` may wrap around the value on targets with 32-bit wide pointers
154
-
--> tests/ui/cast_size.rs:51:5
154
+
--> tests/ui/cast_size.rs:53:5
155
155
|
156
156
LL | 1u32 as isize;
157
157
| ^^^^^^^^^^^^^
158
158
159
159
error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
160
-
--> tests/ui/cast_size.rs:59:5
160
+
--> tests/ui/cast_size.rs:61:5
161
161
|
162
162
LL | 999_999_999 as f32;
163
163
| ^^^^^^^^^^^^^^^^^^
164
164
165
165
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.64bit.stderr
+18-18
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
error: casting `isize` to `i8` may truncate the value
2
-
--> tests/ui/cast_size.rs:15:5
2
+
--> tests/ui/cast_size.rs:17:5
3
3
|
4
4
LL | 1isize as i8;
5
5
| ^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL | i8::try_from(1isize);
13
13
| ~~~~~~~~~~~~~~~~~~~~
14
14
15
15
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
-
--> tests/ui/cast_size.rs:22:5
16
+
--> tests/ui/cast_size.rs:24:5
17
17
|
18
18
LL | x0 as f32;
19
19
| ^^^^^^^^^
@@ -22,25 +22,25 @@ LL | x0 as f32;
22
22
= help: to override `-D warnings` add `#[allow(clippy::cast_precision_loss)]`
23
23
24
24
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
-
--> tests/ui/cast_size.rs:24:5
25
+
--> tests/ui/cast_size.rs:26:5
26
26
|
27
27
LL | x1 as f32;
28
28
| ^^^^^^^^^
29
29
30
30
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
-
--> tests/ui/cast_size.rs:26:5
31
+
--> tests/ui/cast_size.rs:28:5
32
32
|
33
33
LL | x0 as f64;
34
34
| ^^^^^^^^^
35
35
36
36
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
-
--> tests/ui/cast_size.rs:28:5
37
+
--> tests/ui/cast_size.rs:30:5
38
38
|
39
39
LL | x1 as f64;
40
40
| ^^^^^^^^^
41
41
42
42
error: casting `isize` to `i32` may truncate the value on targets with 64-bit wide pointers
43
-
--> tests/ui/cast_size.rs:33:5
43
+
--> tests/ui/cast_size.rs:35:5
44
44
|
45
45
LL | 1isize as i32;
46
46
| ^^^^^^^^^^^^^
@@ -52,7 +52,7 @@ LL | i32::try_from(1isize);
52
52
| ~~~~~~~~~~~~~~~~~~~~~
53
53
54
54
error: casting `isize` to `u32` may truncate the value on targets with 64-bit wide pointers
55
-
--> tests/ui/cast_size.rs:35:5
55
+
--> tests/ui/cast_size.rs:37:5
56
56
|
57
57
LL | 1isize as u32;
58
58
| ^^^^^^^^^^^^^
@@ -64,7 +64,7 @@ LL | u32::try_from(1isize);
64
64
| ~~~~~~~~~~~~~~~~~~~~~
65
65
66
66
error: casting `usize` to `u32` may truncate the value on targets with 64-bit wide pointers
67
-
--> tests/ui/cast_size.rs:37:5
67
+
--> tests/ui/cast_size.rs:39:5
68
68
|
69
69
LL | 1usize as u32;
70
70
| ^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL | u32::try_from(1usize);
76
76
| ~~~~~~~~~~~~~~~~~~~~~
77
77
78
78
error: casting `usize` to `i32` may truncate the value on targets with 64-bit wide pointers
79
-
--> tests/ui/cast_size.rs:39:5
79
+
--> tests/ui/cast_size.rs:41:5
80
80
|
81
81
LL | 1usize as i32;
82
82
| ^^^^^^^^^^^^^
@@ -88,7 +88,7 @@ LL | i32::try_from(1usize);
88
88
| ~~~~~~~~~~~~~~~~~~~~~
89
89
90
90
error: casting `usize` to `i32` may wrap around the value on targets with 32-bit wide pointers
91
-
--> tests/ui/cast_size.rs:39:5
91
+
--> tests/ui/cast_size.rs:41:5
92
92
|
93
93
LL | 1usize as i32;
94
94
| ^^^^^^^^^^^^^
@@ -97,7 +97,7 @@ LL | 1usize as i32;
97
97
= help: to override `-D warnings` add `#[allow(clippy::cast_possible_wrap)]`
98
98
99
99
error: casting `i64` to `isize` may truncate the value on targets with 32-bit wide pointers
100
-
--> tests/ui/cast_size.rs:42:5
100
+
--> tests/ui/cast_size.rs:44:5
101
101
|
102
102
LL | 1i64 as isize;
103
103
| ^^^^^^^^^^^^^
@@ -109,7 +109,7 @@ LL | isize::try_from(1i64);
109
109
| ~~~~~~~~~~~~~~~~~~~~~
110
110
111
111
error: casting `i64` to `usize` may truncate the value on targets with 32-bit wide pointers
112
-
--> tests/ui/cast_size.rs:44:5
112
+
--> tests/ui/cast_size.rs:46:5
113
113
|
114
114
LL | 1i64 as usize;
115
115
| ^^^^^^^^^^^^^
@@ -121,7 +121,7 @@ LL | usize::try_from(1i64);
121
121
| ~~~~~~~~~~~~~~~~~~~~~
122
122
123
123
error: casting `u64` to `isize` may truncate the value on targets with 32-bit wide pointers
124
-
--> tests/ui/cast_size.rs:46:5
124
+
--> tests/ui/cast_size.rs:48:5
125
125
|
126
126
LL | 1u64 as isize;
127
127
| ^^^^^^^^^^^^^
@@ -133,13 +133,13 @@ LL | isize::try_from(1u64);
133
133
| ~~~~~~~~~~~~~~~~~~~~~
134
134
135
135
error: casting `u64` to `isize` may wrap around the value on targets with 64-bit wide pointers
136
-
--> tests/ui/cast_size.rs:46:5
136
+
--> tests/ui/cast_size.rs:48:5
137
137
|
138
138
LL | 1u64 as isize;
139
139
| ^^^^^^^^^^^^^
140
140
141
141
error: casting `u64` to `usize` may truncate the value on targets with 32-bit wide pointers
142
-
--> tests/ui/cast_size.rs:49:5
142
+
--> tests/ui/cast_size.rs:51:5
143
143
|
144
144
LL | 1u64 as usize;
145
145
| ^^^^^^^^^^^^^
@@ -151,19 +151,19 @@ LL | usize::try_from(1u64);
151
151
| ~~~~~~~~~~~~~~~~~~~~~
152
152
153
153
error: casting `u32` to `isize` may wrap around the value on targets with 32-bit wide pointers
154
-
--> tests/ui/cast_size.rs:51:5
154
+
--> tests/ui/cast_size.rs:53:5
155
155
|
156
156
LL | 1u32 as isize;
157
157
| ^^^^^^^^^^^^^
158
158
159
159
error: casting `i32` to `f32` causes a loss of precision (`i32` is 32 bits wide, but `f32`'s mantissa is only 23 bits wide)
160
-
--> tests/ui/cast_size.rs:59:5
160
+
--> tests/ui/cast_size.rs:61:5
161
161
|
162
162
LL | 999_999_999 as f32;
163
163
| ^^^^^^^^^^^^^^^^^^
164
164
165
165
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)
0 commit comments