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