1
Fork 0

Fix has_body() and change resolve_drop_in_place() sig

Fixed the `has_body()` function operator. Before that, this function was
returning false for all shims.

Change resolve_drop_in_place() to also return an instance for empty
shims, since they may still be required for vtable construction.
This commit is contained in:
Celina G. Val 2023-11-16 12:04:25 -08:00
parent 4c00aa3d74
commit 8e81fc0087
4 changed files with 20 additions and 18 deletions

View file

@ -253,7 +253,7 @@ pub trait Context {
fn resolve_instance(&self, def: FnDef, args: &GenericArgs) -> Option<Instance>;
/// Resolve an instance for drop_in_place for the given type.
fn resolve_drop_in_place(&self, ty: Ty) -> Option<Instance>;
fn resolve_drop_in_place(&self, ty: Ty) -> Instance;
/// Resolve instance for a function pointer.
fn resolve_for_fn_ptr(&self, def: FnDef, args: &GenericArgs) -> Option<Instance>;