pub fn type_needs_drop(ty: Type, type_pool: &TypeInternPool) -> boolExpand description
Return true if ty requires a drop call when it goes out of scope.
Primitive scalars, unit-only enums, pointers, and unit/never are trivially droppable. A struct needs drop if it has a destructor or if any field needs drop. An array needs drop if its element type needs drop. A data enum needs drop if any variant has a field that needs drop.