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

@ -173,7 +173,7 @@ pub enum InstanceDef<'tcx> {
///
/// The `DefId` is for `core::future::async_drop::async_drop_in_place`, the `Ty`
/// is the type `T`.
AsyncDropGlueCtorShim(DefId, Ty<'tcx>),
AsyncDropGlueCtorShim(DefId, Option<Ty<'tcx>>),
}
impl<'tcx> Instance<'tcx> {
@ -406,7 +406,8 @@ fn fmt_instance(
InstanceDef::DropGlue(_, Some(ty)) => write!(f, " - shim(Some({ty}))"),
InstanceDef::CloneShim(_, ty) => write!(f, " - shim({ty})"),
InstanceDef::FnPtrAddrShim(_, ty) => write!(f, " - shim({ty})"),
InstanceDef::AsyncDropGlueCtorShim(_, ty) => write!(f, " - shim({ty})"),
InstanceDef::AsyncDropGlueCtorShim(_, None) => write!(f, " - shim(None)"),
InstanceDef::AsyncDropGlueCtorShim(_, Some(ty)) => write!(f, " - shim(Some({ty}))"),
}
}