1
Fork 0

Add simple async drop glue generation

Explainer: https://zetanumbers.github.io/book/async-drop-design.html

https://github.com/rust-lang/rust/pull/121801
This commit is contained in:
zetanumbers 2024-02-13 12:31:41 +03:00 committed by Daria Sukhonina
parent 1dea922ea6
commit 24a24ec6ba
40 changed files with 1921 additions and 20 deletions

View file

@ -55,7 +55,9 @@ pub(super) fn mangle<'tcx>(
printer
.print_def_path(
def_id,
if let ty::InstanceDef::DropGlue(_, _) = instance.def {
if let ty::InstanceDef::DropGlue(_, _) | ty::InstanceDef::AsyncDropGlueCtorShim(_, _) =
instance.def
{
// Add the name of the dropped type to the symbol name
&*instance.args
} else {