Rollup merge of #79968 - bjorn3:better_drop_glue_debuginfo, r=matthewjasper
Improve core::ptr::drop_in_place debuginfo * Use span of the dropped type as function span when possible. * Rename symbol from `core::ptr::drop_in_place::$hash` to `{{drop}}::<$TYPE>::$hash`. Fixes #77465 (I haven't yet updated the tests)
This commit is contained in:
commit
f90c7f0f42
1 changed files with 9 additions and 1 deletions
|
@ -56,7 +56,15 @@ pub(super) fn mangle(
|
|||
let hash = get_symbol_hash(tcx, instance, instance_ty, instantiating_crate);
|
||||
|
||||
let mut printer = SymbolPrinter { tcx, path: SymbolPath::new(), keep_within_component: false }
|
||||
.print_def_path(def_id, &[])
|
||||
.print_def_path(
|
||||
def_id,
|
||||
if let ty::InstanceDef::DropGlue(_, _) = instance.def {
|
||||
// Add the name of the dropped type to the symbol name
|
||||
&*instance.substs
|
||||
} else {
|
||||
&[]
|
||||
},
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
if let ty::InstanceDef::VtableShim(..) = instance.def {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue