File tree Expand file tree Collapse file tree 1 file changed +9
-21
lines changed
compiler/rustc_symbol_mangling/src Expand file tree Collapse file tree 1 file changed +9
-21
lines changed Original file line number Diff line number Diff line change @@ -55,28 +55,16 @@ pub(super) fn mangle(
55
55
56
56
let hash = get_symbol_hash ( tcx, instance, instance_ty, instantiating_crate) ;
57
57
58
- if let ty:: InstanceDef :: DropGlue ( _drop_in_place, ty) = instance. def {
59
- // Use `{{drop}}::<$TYPE>::$hash` as name for the drop glue instead of
60
- // `core::mem::drop_in_place::$hash`.
61
- let mut printer =
62
- SymbolPrinter { tcx, path : SymbolPath :: new ( ) , keep_within_component : false } ;
63
- printer. write_str ( "{{drop}}" ) . unwrap ( ) ;
64
- printer. path . finalize_pending_component ( ) ;
65
- let printer = printer
66
- . generic_delimiters ( |mut printer| {
67
- if let Some ( ty) = ty {
68
- printer. print_type ( ty)
69
- } else {
70
- printer. write_str ( "_" ) ?;
71
- Ok ( printer)
72
- }
73
- } )
74
- . unwrap ( ) ;
75
- return printer. path . finish ( hash) ;
76
- }
77
-
78
58
let mut printer = SymbolPrinter { tcx, path : SymbolPath :: new ( ) , keep_within_component : false }
79
- . print_def_path ( def_id, & [ ] )
59
+ . print_def_path (
60
+ def_id,
61
+ if let ty:: InstanceDef :: DropGlue ( _, _) = instance. def {
62
+ // Add the name of the dropped type to the symbol name
63
+ & * instance. substs
64
+ } else {
65
+ & [ ]
66
+ } ,
67
+ )
80
68
. unwrap ( ) ;
81
69
82
70
if let ty:: InstanceDef :: VtableShim ( ..) = instance. def {
You can’t perform that action at this time.
0 commit comments