@@ -8,207 +8,196 @@ LL | *unsafe { Box::from_raw(Box::into_raw(Box::new(o)) as *mut super::i
88 = help: to override `-D warnings` add `#[allow(clippy::ptr_as_ptr)]`
99
1010error: `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
1212 |
1313LL | let _ = ptr as *const i32;
1414 | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
1515
1616error: `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
1818 |
1919LL | let _ = mut_ptr as *mut i32;
2020 | ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
2121
2222error: `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
2424 |
2525LL | let _ = *ptr_ptr as *const i32;
2626 | ^^^^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `(*ptr_ptr).cast::<i32>()`
2727
2828error: `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
3030 |
3131LL | let _: *const i32 = ptr as *const _;
3232 | ^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast()`
3333
3434error: `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
3636 |
3737LL | let _: *mut i32 = mut_ptr as _;
3838 | ^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast()`
3939
4040error: `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
5342 |
5443LL | let _ = ptr as *const i32;
5544 | ^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `ptr.cast::<i32>()`
5645
5746error: `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
5948 |
6049LL | let _ = mut_ptr as *mut i32;
6150 | ^^^^^^^^^^^^^^^^^^^ help: try `pointer::cast`, a safer alternative: `mut_ptr.cast::<i32>()`
6251
6352error: `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
6554 |
6655LL | ptr::null_mut() as *mut u32
6756 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut::<u32>()`
6857
6958error: `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
7160 |
7261LL | std::ptr::null_mut() as *mut u32
7362 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut::<u32>()`
7463
7564error: `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
7766 |
7867LL | ptr::null_mut() as *mut u32
7968 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut::<u32>()`
8069
8170error: `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
8372 |
8473LL | core::ptr::null_mut() as *mut u32
8574 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut::<u32>()`
8675
8776error: `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
8978 |
9079LL | ptr::null() as *const u32
9180 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null::<u32>()`
9281
9382error: `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
9584 |
9685LL | std::ptr::null() as *const u32
9786 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null::<u32>()`
9887
9988error: `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
10190 |
10291LL | ptr::null() as *const u32
10392 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null::<u32>()`
10493
10594error: `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
10796 |
10897LL | core::ptr::null() as *const u32
10998 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null::<u32>()`
11099
111100error: `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
113102 |
114103LL | ptr::null_mut() as *mut _
115104 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
116105
117106error: `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
119108 |
120109LL | std::ptr::null_mut() as *mut _
121110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut()`
122111
123112error: `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
125114 |
126115LL | ptr::null_mut() as *mut _
127116 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
128117
129118error: `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
131120 |
132121LL | core::ptr::null_mut() as *mut _
133122 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut()`
134123
135124error: `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
137126 |
138127LL | ptr::null() as *const _
139128 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
140129
141130error: `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
143132 |
144133LL | std::ptr::null() as *const _
145134 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null()`
146135
147136error: `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
149138 |
150139LL | ptr::null() as *const _
151140 | ^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
152141
153142error: `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
155144 |
156145LL | core::ptr::null() as *const _
157146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null()`
158147
159148error: `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
161150 |
162151LL | ptr::null_mut() as _
163152 | ^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
164153
165154error: `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
167156 |
168157LL | std::ptr::null_mut() as _
169158 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null_mut()`
170159
171160error: `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
173162 |
174163LL | ptr::null_mut() as _
175164 | ^^^^^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null_mut()`
176165
177166error: `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
179168 |
180169LL | core::ptr::null_mut() as _
181170 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null_mut()`
182171
183172error: `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
185174 |
186175LL | ptr::null() as _
187176 | ^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
188177
189178error: `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
191180 |
192181LL | std::ptr::null() as _
193182 | ^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null()`
194183
195184error: `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
197186 |
198187LL | ptr::null() as _
199188 | ^^^^^^^^^^^^^^^^ help: try call directly: `ptr::null()`
200189
201190error: `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
203192 |
204193LL | core::ptr::null() as _
205194 | ^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `core::ptr::null()`
206195
207196error: `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
209198 |
210199LL | let _: fn() = std::mem::transmute(std::ptr::null::<()>() as *const u8);
211200 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try call directly: `std::ptr::null::<u8>()`
212201
213- error: aborting due to 34 previous errors
202+ error: aborting due to 33 previous errors
214203
0 commit comments