Skip to content

Commit 6407edb

Browse files
authored
Merge branch 'main' into main
2 parents 4404cad + f053741 commit 6407edb

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "rustc-demangle"
3-
version = "0.1.23"
3+
version = "0.1.24"
44
authors = ["Alex Crichton <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
readme = "README.md"
7-
repository = "https://github.com/alexcrichton/rustc-demangle"
8-
homepage = "https://github.com/alexcrichton/rustc-demangle"
7+
repository = "https://github.com/rust-lang/rustc-demangle"
8+
homepage = "https://github.com/rust-lang/rustc-demangle"
99
documentation = "https://docs.rs/rustc-demangle"
1010
description = """
1111
Rust compiler symbol demangling.

src/v0.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ impl<'a, 'b, 's> Printer<'a, 'b, 's> {
803803

804804
self.print(name)?;
805805
if let Some(out) = &mut self.out {
806-
if !out.alternate() {
806+
if !out.alternate() && dis != 0 {
807807
out.write_str("[")?;
808808
fmt::LowerHex::fmt(&dis, out)?;
809809
out.write_str("]")?;
@@ -1271,7 +1271,7 @@ mod tests {
12711271
t_const!($mangled, $value);
12721272
t!(
12731273
concat!("_RIC0K", $mangled, "E"),
1274-
concat!("[0]::<", $value, $value_ty_suffix, ">")
1274+
concat!("::<", $value, $value_ty_suffix, ">")
12751275
);
12761276
}};
12771277
}
@@ -1282,6 +1282,12 @@ mod tests {
12821282
t_nohash!("__RNvC6_123foo3bar", "123foo::bar");
12831283
}
12841284

1285+
#[test]
1286+
fn demangle_crate_with_zero_disambiguator() {
1287+
t!("_RC4f128", "f128");
1288+
t_nohash!("_RC4f128", "f128");
1289+
}
1290+
12851291
#[test]
12861292
fn demangle_utf8_idents() {
12871293
t_nohash!(

0 commit comments

Comments
 (0)