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