1
- error: `as` casting between raw pointers without changing its mutability
1
+ error: `as` casting between raw pointers without changing their constness
2
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>) }
@@ -7,195 +7,195 @@ LL | *unsafe { Box::from_raw(Box::into_raw(Box::new(o)) as *mut super::i
7
7
= note: `-D clippy::ptr-as-ptr` implied by `-D warnings`
8
8
= help: to override `-D warnings` add `#[allow(clippy::ptr_as_ptr)]`
9
9
10
- error: `as` casting between raw pointers without changing its mutability
10
+ error: `as` casting between raw pointers without changing their constness
11
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
- error: `as` casting between raw pointers without changing its mutability
16
+ error: `as` casting between raw pointers without changing their constness
17
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
- error: `as` casting between raw pointers without changing its mutability
22
+ error: `as` casting between raw pointers without changing their constness
23
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
- error: `as` casting between raw pointers without changing its mutability
28
+ error: `as` casting between raw pointers without changing their constness
29
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
- error: `as` casting between raw pointers without changing its mutability
34
+ error: `as` casting between raw pointers without changing their constness
35
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
- error: `as` casting between raw pointers without changing its mutability
40
+ error: `as` casting between raw pointers without changing their constness
41
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
- error: `as` casting between raw pointers without changing its mutability
48
+ error: `as` casting between raw pointers without changing their constness
49
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
- error: `as` casting between raw pointers without changing its mutability
54
+ error: `as` casting between raw pointers without changing their constness
55
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
- error: `as` casting between raw pointers without changing its mutability
60
+ error: `as` casting between raw pointers without changing their constness
61
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
- error: `as` casting between raw pointers without changing its mutability
66
+ error: `as` casting between raw pointers without changing their constness
67
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
- error: `as` casting between raw pointers without changing its mutability
72
+ error: `as` casting between raw pointers without changing their constness
73
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
- error: `as` casting between raw pointers without changing its mutability
78
+ error: `as` casting between raw pointers without changing their constness
79
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
- error: `as` casting between raw pointers without changing its mutability
84
+ error: `as` casting between raw pointers without changing their constness
85
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
- error: `as` casting between raw pointers without changing its mutability
90
+ error: `as` casting between raw pointers without changing their constness
91
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
- error: `as` casting between raw pointers without changing its mutability
96
+ error: `as` casting between raw pointers without changing their constness
97
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
- error: `as` casting between raw pointers without changing its mutability
102
+ error: `as` casting between raw pointers without changing their constness
103
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
- error: `as` casting between raw pointers without changing its mutability
108
+ error: `as` casting between raw pointers without changing their constness
109
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
- error: `as` casting between raw pointers without changing its mutability
114
+ error: `as` casting between raw pointers without changing their constness
115
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
- error: `as` casting between raw pointers without changing its mutability
120
+ error: `as` casting between raw pointers without changing their constness
121
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
- error: `as` casting between raw pointers without changing its mutability
126
+ error: `as` casting between raw pointers without changing their constness
127
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
- error: `as` casting between raw pointers without changing its mutability
132
+ error: `as` casting between raw pointers without changing their constness
133
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
- error: `as` casting between raw pointers without changing its mutability
138
+ error: `as` casting between raw pointers without changing their constness
139
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
- error: `as` casting between raw pointers without changing its mutability
144
+ error: `as` casting between raw pointers without changing their constness
145
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
- error: `as` casting between raw pointers without changing its mutability
150
+ error: `as` casting between raw pointers without changing their constness
151
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
- error: `as` casting between raw pointers without changing its mutability
156
+ error: `as` casting between raw pointers without changing their constness
157
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
- error: `as` casting between raw pointers without changing its mutability
162
+ error: `as` casting between raw pointers without changing their constness
163
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
- error: `as` casting between raw pointers without changing its mutability
168
+ error: `as` casting between raw pointers without changing their constness
169
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
- error: `as` casting between raw pointers without changing its mutability
174
+ error: `as` casting between raw pointers without changing their constness
175
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
- error: `as` casting between raw pointers without changing its mutability
180
+ error: `as` casting between raw pointers without changing their constness
181
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
- error: `as` casting between raw pointers without changing its mutability
186
+ error: `as` casting between raw pointers without changing their constness
187
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
- error: `as` casting between raw pointers without changing its mutability
192
+ error: `as` casting between raw pointers without changing their constness
193
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
- error: `as` casting between raw pointers without changing its mutability
198
+ error: `as` casting between raw pointers without changing their constness
199
199
--> tests/ui/ptr_as_ptr.rs:186:9
200
200
|
201
201
LL | core::ptr::null() as _
0 commit comments