File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed
compiler/rustc_ty_utils/src Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,31 @@ where
172
172
queue_type ( self , component) ;
173
173
}
174
174
}
175
- _ => return Some ( Err ( AlwaysRequiresDrop ) ) ,
175
+
176
+ ty:: Foreign ( _) | ty:: Dynamic ( ..) | ty:: Placeholder ( _) => {
177
+ return Some ( Err ( AlwaysRequiresDrop ) ) ;
178
+ }
179
+
180
+ ty:: Bool
181
+ | ty:: Char
182
+ | ty:: Int ( _)
183
+ | ty:: Uint ( _)
184
+ | ty:: Float ( _)
185
+ | ty:: Str
186
+ | ty:: Slice ( _)
187
+ | ty:: Ref ( ..)
188
+ | ty:: RawPtr ( ..)
189
+ | ty:: FnDef ( ..)
190
+ | ty:: FnPtr ( ..)
191
+ | ty:: Tuple ( _)
192
+ | ty:: Bound ( ..)
193
+ | ty:: GeneratorWitness ( ..)
194
+ | ty:: GeneratorWitnessMIR ( ..)
195
+ | ty:: Never
196
+ | ty:: Infer ( _)
197
+ | ty:: Error ( _) => {
198
+ bug ! ( "unexpected type returned by `needs_drop_components`: {component}" )
199
+ }
176
200
}
177
201
}
178
202
}
You can’t perform that action at this time.
0 commit comments