Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
nbdd0121 committed Apr 24, 2024
1 parent 23bfbe2 commit bcaf6eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/mir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ impl<'tcx> AnalysisCtxt<'tcx> {
| ty::InstanceDef::DropGlue(..)
| ty::InstanceDef::CloneShim(..)
| ty::InstanceDef::ThreadLocalShim(..)
| ty::InstanceDef::FnPtrAddrShim(..) => self.mir_shims(instance),
| ty::InstanceDef::FnPtrAddrShim(..)
| ty::InstanceDef::AsyncDropGlueCtorShim(..) => self.mir_shims(instance),
}
}
}
3 changes: 2 additions & 1 deletion src/monomorphize_collector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -731,13 +731,14 @@ fn visit_instance_use<'tcx>(
ty::InstanceDef::ThreadLocalShim(..) => {
bug!("{:?} being reified", instance);
}
ty::InstanceDef::DropGlue(_, None) => {
ty::InstanceDef::DropGlue(_, None) | ty::InstanceDef::AsyncDropGlueCtorShim(_, None) => {
// Don't need to emit noop drop glue if we are calling directly.
if !is_direct_call {
output.push(create_fn_mono_item(tcx, instance, source));
}
}
ty::InstanceDef::DropGlue(_, Some(_))
| ty::InstanceDef::AsyncDropGlueCtorShim(_, Some(_))
| ty::InstanceDef::VTableShim(..)
| ty::InstanceDef::ReifyShim(..)
| ty::InstanceDef::ClosureOnceShim { .. }
Expand Down

0 comments on commit bcaf6eb

Please sign in to comment.