taskdump: remove crate disambiguators from output (#8264)

This commit is contained in:
Alice Ryhl
2026-07-10 12:09:45 +02:00
committed by GitHub
parent c4c6265a07
commit cd3bcca32b
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -65,7 +65,8 @@ impl Eq for Symbol {}
impl fmt::Display for Symbol {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(name) = self.symbol.name() {
let name = name.to_string();
// Printing this using :# formatting omits crate disambiguators.
let name = format!("{name:#}");
let name = if let Some((name, _)) = name.rsplit_once("::") {
name
} else {
+1 -1
View File
@@ -147,7 +147,7 @@ fn trace_leaf_for_test(meta: &TraceMeta, log: &mut Vec<Vec<String>>) {
for frame in bt.frames() {
for symbol in frame.symbols() {
if let Some(name) = symbol.name() {
names.push(strip_symbol_hash(&format!("{name}")).to_owned());
names.push(strip_symbol_hash(&format!("{name:#}")).to_owned());
}
}
}