Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4412,6 +4412,7 @@ dependencies = [
"gsgdt",
"parking_lot",
"polonius-engine",
"rustc-demangle",
"rustc_abi",
"rustc_apfloat",
"rustc_arena",
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).

For a detailed explanation of the compiler's architecture and how to begin contributing, see the [rustc-dev-guide](https://rustc-dev-guide.rust-lang.org/).

test1

## License

Rust is primarily distributed under the terms of both the MIT license and the
Expand Down
1 change: 1 addition & 0 deletions compiler/rustc_middle/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ either = "1.5.0"
gsgdt = "0.1.2"
parking_lot = "0.12"
polonius-engine = "0.13.0"
rustc-demangle = "0.1.28"
rustc_abi = { path = "../rustc_abi" }
rustc_apfloat = "0.2.0"
rustc_arena = { path = "../rustc_arena" }
Expand Down
7 changes: 6 additions & 1 deletion compiler/rustc_middle/src/mono.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,12 @@ impl<'tcx> CodegenUnit<'tcx> {
// See https://github.com/rust-lang/rust/pull/145358 for more details.
//
// Sorting by symbol name should not incur any new non-determinism.
items.sort_by_cached_key(|&(i, _)| i.symbol_name(tcx));
items.sort_by_cached_key(|&(i, _)| {
let symbol_name = i.symbol_name(tcx);
let demangled = rustc_demangle::demangle(symbol_name.name);
let name_without_disambiguator = format!("{:#}", demangled);
(name_without_disambiguator, symbol_name)
});
} else {
items.sort_by_cached_key(|&(i, _)| item_sort_key(tcx, i));
}
Expand Down
Loading