Fix disabling the export of noop async_drop_in_place_raw
This commit is contained in:
parent
80c0b7e90f
commit
e239e73a77
9 changed files with 53 additions and 30 deletions
|
@ -158,6 +158,9 @@ pub trait Context {
|
|||
/// Check if this is an empty DropGlue shim.
|
||||
fn is_empty_drop_shim(&self, def: InstanceDef) -> bool;
|
||||
|
||||
/// Check if this is an empty AsyncDropGlueCtor shim.
|
||||
fn is_empty_async_drop_ctor_shim(&self, def: InstanceDef) -> bool;
|
||||
|
||||
/// Convert a non-generic crate item into an instance.
|
||||
/// This function will panic if the item is generic.
|
||||
fn mono_instance(&self, def_id: DefId) -> Instance;
|
||||
|
|
|
@ -157,7 +157,10 @@ impl Instance {
|
|||
/// When generating code for a Drop terminator, users can ignore an empty drop glue.
|
||||
/// These shims are only needed to generate a valid Drop call done via VTable.
|
||||
pub fn is_empty_shim(&self) -> bool {
|
||||
self.kind == InstanceKind::Shim && with(|cx| cx.is_empty_drop_shim(self.def))
|
||||
self.kind == InstanceKind::Shim
|
||||
&& with(|cx| {
|
||||
cx.is_empty_drop_shim(self.def) || cx.is_empty_async_drop_ctor_shim(self.def)
|
||||
})
|
||||
}
|
||||
|
||||
/// Try to constant evaluate the instance into a constant with the given type.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue