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