Remove src/tools/rust-demangler by Zalathar · Pull Request #125880 · rust-lang/rust (original) (raw)

rust-demangler is a small binary that reads a list of mangled symbols from stdin, demangles them (using the rustc-demangle library crate), and prints the demangled symbols to stdout.

It was added as part of the initial implementation of coverage instrumentation in 2020/2021, so that coverage tests could pass it to llvm-cov --Xdemangler when generating coverage reports. It has been largely untouched since then.

As of #125816 it is no longer used by coverage tests, and has no remaining in-tree uses.

There is code in bootstrap to build and package the demangler, but it's unclear where the resulting binaries actually end up, or whether there's any reasonable way for rustup users to obtain them.


For users needing a command-line demangler, rustfilt exists and is more actively maintained. It's also quite easy to use the rustc-demangle library to build a custom command-line demangler if necessary, with only a few lines of code.

The tool's name (rust-demangler) is easily confused with the name of the library crate rustc-demangle, so removing the tool will eliminate that confusion. There also doesn't appear to be much reason to use rust-demangler over rustfilt.


This PR therefore removes the tool, and removes all of its associated code from bootstrap.

MCP filed: rust-lang/compiler-team#754