@@ -8,207 +8,196 @@ LL | *unsafe { Box::from_raw(Box::into_raw(Box::new(o)) as *mut super::i
8
8
= help: to override `-D warnings` add `#[allow(clippy::ptr_as_ptr)]`
9
9
10
10
error: `as` casting between raw pointers without changing their constness
11
- --> tests/ui/ptr_as_ptr.rs:27 :13
11
+ --> tests/ui/ptr_as_ptr.rs:28 :13
12
12
|
13
13
LL | let _ = ptr as *const i32;
14
14
| ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
15
15
16
16
error: `as` casting between raw pointers without changing their constness
17
- --> tests/ui/ptr_as_ptr.rs:29 :13
17
+ --> tests/ui/ptr_as_ptr.rs:30 :13
18
18
|
19
19
LL | let _ = mut_ptr as *mut i32;
20
20
| ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
21
21
22
22
error: `as` casting between raw pointers without changing their constness
23
- --> tests/ui/ptr_as_ptr.rs:35 :17
23
+ --> tests/ui/ptr_as_ptr.rs:36 :17
24
24
|
25
25
LL | let _ = *ptr_ptr as *const i32;
26
26
| ^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `(*ptr_ptr).cast::<i32>()`
27
27
28
28
error: `as` casting between raw pointers without changing their constness
29
- --> tests/ui/ptr_as_ptr.rs:49 :25
29
+ --> tests/ui/ptr_as_ptr.rs:50 :25
30
30
|
31
31
LL | let _: *const i32 = ptr as *const _;
32
32
| ^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast()`
33
33
34
34
error: `as` casting between raw pointers without changing their constness
35
- --> tests/ui/ptr_as_ptr.rs:51 :23
35
+ --> tests/ui/ptr_as_ptr.rs:52 :23
36
36
|
37
37
LL | let _: *mut i32 = mut_ptr as _;
38
38
| ^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast()`
39
39
40
40
error: `as` casting between raw pointers without changing their constness
41
- --> tests/ui/ptr_as_ptr.rs:57:13
42
- |
43
- LL | ptr as *const i32
44
- | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
45
- ...
46
- LL | foo!();
47
- | ------ in this macro invocation
48
- |
49
- = note: this error originates in the macro `foo` (in Nightly builds, run with -Z macro-backtrace for more info)
50
-
51
- error: `as` casting between raw pointers without changing their constness
52
- --> tests/ui/ptr_as_ptr.rs:84:13
41
+ --> tests/ui/ptr_as_ptr.rs:80:13
53
42
|
54
43
LL | let _ = ptr as *const i32;
55
44
| ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
56
45
57
46
error: `as` casting between raw pointers without changing their constness
58
- --> tests/ui/ptr_as_ptr.rs:86 :13
47
+ --> tests/ui/ptr_as_ptr.rs:82 :13
59
48
|
60
49
LL | let _ = mut_ptr as *mut i32;
61
50
| ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
62
51
63
52
error: `as` casting between raw pointers without changing their constness
64
- --> tests/ui/ptr_as_ptr.rs:94 :9
53
+ --> tests/ui/ptr_as_ptr.rs:90 :9
65
54
|
66
55
LL | ptr::null_mut() as *mut u32
67
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut::<u32>()`
68
57
69
58
error: `as` casting between raw pointers without changing their constness
70
- --> tests/ui/ptr_as_ptr.rs:99 :9
59
+ --> tests/ui/ptr_as_ptr.rs:95 :9
71
60
|
72
61
LL | std::ptr::null_mut() as *mut u32
73
62
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut::<u32>()`
74
63
75
64
error: `as` casting between raw pointers without changing their constness
76
- --> tests/ui/ptr_as_ptr.rs:105 :9
65
+ --> tests/ui/ptr_as_ptr.rs:101 :9
77
66
|
78
67
LL | ptr::null_mut() as *mut u32
79
68
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut::<u32>()`
80
69
81
70
error: `as` casting between raw pointers without changing their constness
82
- --> tests/ui/ptr_as_ptr.rs:110 :9
71
+ --> tests/ui/ptr_as_ptr.rs:106 :9
83
72
|
84
73
LL | core::ptr::null_mut() as *mut u32
85
74
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut::<u32>()`
86
75
87
76
error: `as` casting between raw pointers without changing their constness
88
- --> tests/ui/ptr_as_ptr.rs:116 :9
77
+ --> tests/ui/ptr_as_ptr.rs:112 :9
89
78
|
90
79
LL | ptr::null() as *const u32
91
80
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null::<u32>()`
92
81
93
82
error: `as` casting between raw pointers without changing their constness
94
- --> tests/ui/ptr_as_ptr.rs:121 :9
83
+ --> tests/ui/ptr_as_ptr.rs:117 :9
95
84
|
96
85
LL | std::ptr::null() as *const u32
97
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null::<u32>()`
98
87
99
88
error: `as` casting between raw pointers without changing their constness
100
- --> tests/ui/ptr_as_ptr.rs:127 :9
89
+ --> tests/ui/ptr_as_ptr.rs:123 :9
101
90
|
102
91
LL | ptr::null() as *const u32
103
92
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null::<u32>()`
104
93
105
94
error: `as` casting between raw pointers without changing their constness
106
- --> tests/ui/ptr_as_ptr.rs:132 :9
95
+ --> tests/ui/ptr_as_ptr.rs:128 :9
107
96
|
108
97
LL | core::ptr::null() as *const u32
109
98
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null::<u32>()`
110
99
111
100
error: `as` casting between raw pointers without changing their constness
112
- --> tests/ui/ptr_as_ptr.rs:140 :9
101
+ --> tests/ui/ptr_as_ptr.rs:136 :9
113
102
|
114
103
LL | ptr::null_mut() as *mut _
115
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
116
105
117
106
error: `as` casting between raw pointers without changing their constness
118
- --> tests/ui/ptr_as_ptr.rs:145 :9
107
+ --> tests/ui/ptr_as_ptr.rs:141 :9
119
108
|
120
109
LL | std::ptr::null_mut() as *mut _
121
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut()`
122
111
123
112
error: `as` casting between raw pointers without changing their constness
124
- --> tests/ui/ptr_as_ptr.rs:151 :9
113
+ --> tests/ui/ptr_as_ptr.rs:147 :9
125
114
|
126
115
LL | ptr::null_mut() as *mut _
127
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
128
117
129
118
error: `as` casting between raw pointers without changing their constness
130
- --> tests/ui/ptr_as_ptr.rs:156 :9
119
+ --> tests/ui/ptr_as_ptr.rs:152 :9
131
120
|
132
121
LL | core::ptr::null_mut() as *mut _
133
122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut()`
134
123
135
124
error: `as` casting between raw pointers without changing their constness
136
- --> tests/ui/ptr_as_ptr.rs:162 :9
125
+ --> tests/ui/ptr_as_ptr.rs:158 :9
137
126
|
138
127
LL | ptr::null() as *const _
139
128
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
140
129
141
130
error: `as` casting between raw pointers without changing their constness
142
- --> tests/ui/ptr_as_ptr.rs:167 :9
131
+ --> tests/ui/ptr_as_ptr.rs:163 :9
143
132
|
144
133
LL | std::ptr::null() as *const _
145
134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null()`
146
135
147
136
error: `as` casting between raw pointers without changing their constness
148
- --> tests/ui/ptr_as_ptr.rs:173 :9
137
+ --> tests/ui/ptr_as_ptr.rs:169 :9
149
138
|
150
139
LL | ptr::null() as *const _
151
140
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
152
141
153
142
error: `as` casting between raw pointers without changing their constness
154
- --> tests/ui/ptr_as_ptr.rs:178 :9
143
+ --> tests/ui/ptr_as_ptr.rs:174 :9
155
144
|
156
145
LL | core::ptr::null() as *const _
157
146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null()`
158
147
159
148
error: `as` casting between raw pointers without changing their constness
160
- --> tests/ui/ptr_as_ptr.rs:186 :9
149
+ --> tests/ui/ptr_as_ptr.rs:182 :9
161
150
|
162
151
LL | ptr::null_mut() as _
163
152
| ^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
164
153
165
154
error: `as` casting between raw pointers without changing their constness
166
- --> tests/ui/ptr_as_ptr.rs:191 :9
155
+ --> tests/ui/ptr_as_ptr.rs:187 :9
167
156
|
168
157
LL | std::ptr::null_mut() as _
169
158
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut()`
170
159
171
160
error: `as` casting between raw pointers without changing their constness
172
- --> tests/ui/ptr_as_ptr.rs:197 :9
161
+ --> tests/ui/ptr_as_ptr.rs:193 :9
173
162
|
174
163
LL | ptr::null_mut() as _
175
164
| ^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
176
165
177
166
error: `as` casting between raw pointers without changing their constness
178
- --> tests/ui/ptr_as_ptr.rs:202 :9
167
+ --> tests/ui/ptr_as_ptr.rs:198 :9
179
168
|
180
169
LL | core::ptr::null_mut() as _
181
170
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut()`
182
171
183
172
error: `as` casting between raw pointers without changing their constness
184
- --> tests/ui/ptr_as_ptr.rs:208 :9
173
+ --> tests/ui/ptr_as_ptr.rs:204 :9
185
174
|
186
175
LL | ptr::null() as _
187
176
| ^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
188
177
189
178
error: `as` casting between raw pointers without changing their constness
190
- --> tests/ui/ptr_as_ptr.rs:213 :9
179
+ --> tests/ui/ptr_as_ptr.rs:209 :9
191
180
|
192
181
LL | std::ptr::null() as _
193
182
| ^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null()`
194
183
195
184
error: `as` casting between raw pointers without changing their constness
196
- --> tests/ui/ptr_as_ptr.rs:219 :9
185
+ --> tests/ui/ptr_as_ptr.rs:215 :9
197
186
|
198
187
LL | ptr::null() as _
199
188
| ^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
200
189
201
190
error: `as` casting between raw pointers without changing their constness
202
- --> tests/ui/ptr_as_ptr.rs:224 :9
191
+ --> tests/ui/ptr_as_ptr.rs:220 :9
203
192
|
204
193
LL | core::ptr::null() as _
205
194
| ^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null()`
206
195
207
196
error: `as` casting between raw pointers without changing their constness
208
- --> tests/ui/ptr_as_ptr.rs:232 :43
197
+ --> tests/ui/ptr_as_ptr.rs:228 :43
209
198
|
210
199
LL | let _: fn() = std::mem::transmute(std::ptr::null::<()>() as *const u8);
211
200
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null::<u8>()`
212
201
213
- error: aborting due to 34 previous errors
202
+ error: aborting due to 33 previous errors
214
203
0 commit comments