Skip to content

Commit c61d7b2

Browse files
authored
Merge pull request #1859 from erikdesjardins/more-norm
normalize_symbol_name: also strip numeric suffix
2 parents 1fc7195 + 10529cc commit c61d7b2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

collector/src/artifact_stats.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ static RUSTC_HASH_REGEX: OnceLock<Regex> = OnceLock::new();
9595

9696
/// Demangle the symbol and remove rustc mangling hashes.
9797
fn normalize_symbol_name(symbol: &str) -> String {
98-
let regex = RUSTC_HASH_REGEX.get_or_init(|| Regex::new(r#"(::)?\b[a-z0-9]{15,17}\b"#).unwrap());
98+
let regex =
99+
RUSTC_HASH_REGEX.get_or_init(|| Regex::new(r#"(::)?\b[a-z0-9]{15,17}\b(\.\d+)?"#).unwrap());
99100

100101
let symbol = rustc_demangle::demangle(symbol).to_string();
101102
regex.replace_all(&symbol, "").to_string()

0 commit comments

Comments
 (0)