1
Fork 0

some additional refactor

also, treat placeholders equal to params
This commit is contained in:
lcnr 2023-07-18 15:50:34 +02:00
parent 8a0802089c
commit d1b4b458c0
2 changed files with 12 additions and 12 deletions

View file

@ -96,7 +96,7 @@ where
return Some(Err(AlwaysRequiresDrop));
}
let components = match needs_drop_components(ty, &tcx.data_layout) {
let components = match needs_drop_components(tcx, ty) {
Err(e) => return Some(Err(e)),
Ok(components) => components,
};
@ -160,7 +160,7 @@ where
queue_type(self, required);
}
}
ty::Array(..) | ty::Alias(..) | ty::Param(_) => {
ty::Alias(..) | ty::Array(..) | ty::Placeholder(_) | ty::Param(_) => {
if ty == component {
// Return the type to the caller: they may be able
// to normalize further than we can.
@ -173,7 +173,7 @@ where
}
}
ty::Foreign(_) | ty::Dynamic(..) | ty::Placeholder(_) => {
ty::Foreign(_) | ty::Dynamic(..) => {
return Some(Err(AlwaysRequiresDrop));
}