From be7fb2ed554757260b018fda581d416271d2fae3 Mon Sep 17 00:00:00 2001 From: Tobias Decking Date: Sun, 14 Apr 2024 14:56:41 +0200 Subject: [PATCH 1/2] Update encode.rs --- .../rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs index ed7cd8c2da7..40cd0c14b05 100644 --- a/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs +++ b/compiler/rustc_sanitizers/src/cfi/typeid/itanium_cxx_abi/encode.rs @@ -736,7 +736,7 @@ fn encode_ty_name(tcx: TyCtxt<'_>, def_id: DefId) -> String { /// ). fn to_disambiguator(num: u64) -> String { if let Some(num) = num.checked_sub(1) { - format!("s{}_", base_n::encode(num as u128, 62)) + format!("s{}_", base_n::encode(num as u128, base_n::ALPHANUMERIC_ONLY)) } else { "s_".to_string() } @@ -746,7 +746,7 @@ fn to_disambiguator(num: u64) -> String { /// ). fn to_seq_id(num: usize) -> String { if let Some(num) = num.checked_sub(1) { - base_n::encode(num as u128, 36).to_uppercase() + base_n::encode(num as u128, base_n::CASE_INSENSITIVE).to_uppercase() } else { "".to_string() } From e5cf30cd63422ac689ec419a3bee0b35d75ca7d8 Mon Sep 17 00:00:00 2001 From: Tobias Decking Date: Sun, 14 Apr 2024 15:01:04 +0200 Subject: [PATCH 2/2] Update v0.rs --- compiler/rustc_symbol_mangling/src/v0.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_symbol_mangling/src/v0.rs b/compiler/rustc_symbol_mangling/src/v0.rs index cb255fabfe2..58b67c77a61 100644 --- a/compiler/rustc_symbol_mangling/src/v0.rs +++ b/compiler/rustc_symbol_mangling/src/v0.rs @@ -831,7 +831,7 @@ fn path_generic_args( /// e.g. `1` becomes `"0_"`, `62` becomes `"Z_"`, etc. pub(crate) fn push_integer_62(x: u64, output: &mut String) { if let Some(x) = x.checked_sub(1) { - base_n::push_str(x as u128, 62, output); + base_n::push_str(x as u128, base_n::ALPHANUMERIC_ONLY, output); } output.push('_'); }