1
Fork 0

Use non-exhaustive matches for TyKind

Also no longer export noop async_drop_in_place_raw
This commit is contained in:
Daria Sukhonina 2024-04-17 20:49:53 +03:00
parent 24a24ec6ba
commit 80c0b7e90f
13 changed files with 150 additions and 182 deletions

View file

@ -966,14 +966,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(..)
| ty::InstanceDef::AsyncDropGlueCtorShim(_, Some(_))
| ty::InstanceDef::VTableShim(..)
| ty::InstanceDef::ReifyShim(..)
| ty::InstanceDef::ClosureOnceShim { .. }