@@ -374,7 +374,7 @@ fn exported_symbols_provider_local(
374374 ) ) ;
375375 }
376376 MonoItem :: Fn ( Instance {
377- def : InstanceKind :: AsyncDropGlueCtorShim ( _, Some ( ty ) ) ,
377+ def : InstanceKind :: AsyncDropGlueCtorShim ( _, ty ) ,
378378 args,
379379 } ) => {
380380 // A little sanity-check
@@ -388,6 +388,16 @@ fn exported_symbols_provider_local(
388388 } ,
389389 ) ) ;
390390 }
391+ MonoItem :: Fn ( Instance { def : InstanceKind :: AsyncDropGlue ( def, ty) , args : _ } ) => {
392+ symbols. push ( (
393+ ExportedSymbol :: AsyncDropGlue ( def, ty) ,
394+ SymbolExportInfo {
395+ level : SymbolExportLevel :: Rust ,
396+ kind : SymbolExportKind :: Text ,
397+ used : false ,
398+ } ,
399+ ) ) ;
400+ }
391401 _ => {
392402 // Any other symbols don't qualify for sharing
393403 }
@@ -429,11 +439,10 @@ fn upstream_monomorphizations_provider(
429439 if let Some ( async_drop_in_place_fn_def_id) = async_drop_in_place_fn_def_id {
430440 ( async_drop_in_place_fn_def_id, tcx. mk_args ( & [ ty. into ( ) ] ) )
431441 } else {
432- // `drop_in_place` in place does not exist, don't try
433- // to use it.
434442 continue ;
435443 }
436444 }
445+ ExportedSymbol :: AsyncDropGlue ( def_id, ty) => ( def_id, tcx. mk_args ( & [ ty. into ( ) ] ) ) ,
437446 ExportedSymbol :: NonGeneric ( ..)
438447 | ExportedSymbol :: ThreadLocalShim ( ..)
439448 | ExportedSymbol :: NoDefId ( ..) => {
@@ -582,6 +591,13 @@ pub(crate) fn symbol_name_for_instance_in_crate<'tcx>(
582591 instantiating_crate,
583592 )
584593 }
594+ ExportedSymbol :: AsyncDropGlue ( def_id, ty) => {
595+ rustc_symbol_mangling:: symbol_name_for_instance_in_crate (
596+ tcx,
597+ Instance :: resolve_async_drop_in_place_poll ( tcx, def_id, ty) ,
598+ instantiating_crate,
599+ )
600+ }
585601 ExportedSymbol :: NoDefId ( symbol_name) => symbol_name. to_string ( ) ,
586602 }
587603}
@@ -604,6 +620,7 @@ fn calling_convention_for_symbol<'tcx>(
604620 // AsyncDropGlueCtorShim always use the Rust calling convention and thus follow the
605621 // target's default symbol decoration scheme.
606622 ExportedSymbol :: AsyncDropGlueCtorShim ( ..) => None ,
623+ ExportedSymbol :: AsyncDropGlue ( ..) => None ,
607624 // NoDefId always follow the target's default symbol decoration scheme.
608625 ExportedSymbol :: NoDefId ( ..) => None ,
609626 // ThreadLocalShim always follow the target's default symbol decoration scheme.
0 commit comments