@@ -374,7 +374,7 @@ fn exported_symbols_provider_local(
374
374
) ) ;
375
375
}
376
376
MonoItem :: Fn ( Instance {
377
- def : InstanceKind :: AsyncDropGlueCtorShim ( _, Some ( ty ) ) ,
377
+ def : InstanceKind :: AsyncDropGlueCtorShim ( _, ty ) ,
378
378
args,
379
379
} ) => {
380
380
// A little sanity-check
@@ -388,6 +388,16 @@ fn exported_symbols_provider_local(
388
388
} ,
389
389
) ) ;
390
390
}
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
+ }
391
401
_ => {
392
402
// Any other symbols don't qualify for sharing
393
403
}
@@ -429,11 +439,10 @@ fn upstream_monomorphizations_provider(
429
439
if let Some ( async_drop_in_place_fn_def_id) = async_drop_in_place_fn_def_id {
430
440
( async_drop_in_place_fn_def_id, tcx. mk_args ( & [ ty. into ( ) ] ) )
431
441
} else {
432
- // `drop_in_place` in place does not exist, don't try
433
- // to use it.
434
442
continue ;
435
443
}
436
444
}
445
+ ExportedSymbol :: AsyncDropGlue ( def_id, ty) => ( def_id, tcx. mk_args ( & [ ty. into ( ) ] ) ) ,
437
446
ExportedSymbol :: NonGeneric ( ..)
438
447
| ExportedSymbol :: ThreadLocalShim ( ..)
439
448
| ExportedSymbol :: NoDefId ( ..) => {
@@ -582,6 +591,13 @@ pub(crate) fn symbol_name_for_instance_in_crate<'tcx>(
582
591
instantiating_crate,
583
592
)
584
593
}
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
+ }
585
601
ExportedSymbol :: NoDefId ( symbol_name) => symbol_name. to_string ( ) ,
586
602
}
587
603
}
@@ -604,6 +620,7 @@ fn calling_convention_for_symbol<'tcx>(
604
620
// AsyncDropGlueCtorShim always use the Rust calling convention and thus follow the
605
621
// target's default symbol decoration scheme.
606
622
ExportedSymbol :: AsyncDropGlueCtorShim ( ..) => None ,
623
+ ExportedSymbol :: AsyncDropGlue ( ..) => None ,
607
624
// NoDefId always follow the target's default symbol decoration scheme.
608
625
ExportedSymbol :: NoDefId ( ..) => None ,
609
626
// ThreadLocalShim always follow the target's default symbol decoration scheme.
0 commit comments