Skip to content

Allow formatting the demangled symbol name without the trailing hash. #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 22, 2016

Conversation

luser
Copy link
Contributor

@luser luser commented Oct 22, 2016

This changeset allows for formatting the symbol name without the trailing
hash. The hash is useful for Rust's linking situation, but not particularly
useful to humans, and possibly harmful in cases where we want to use
function names for aggregation (like crash reporting).

Since the existing code is just using the Display trait for string conversion,
I made it support the "alternate" format modifier. I don't know if there's
a more sensible way to handle this. I could instead implement a separate
method on the type and have the Display implementation call that, if
you prefer.

This changeset allows for formatting the symbol name without the trailing
hash. The hash is useful for Rust's linking situation, but not particularly
useful to humans, and possibly harmful in cases where we want to use
function names for aggregation (like crash reporting).

Since the existing code is just using the `Display` trait for string conversion,
I made it support the "alternate" format modifier. I don't know if there's
a more sensible way to handle this. I could instead implement a separate
method on the type and have the `Display` implementation call that, if
you prefer.
@alexcrichton
Copy link
Member

Nice!

@alexcrichton alexcrichton merged commit 1523aeb into rust-lang:master Oct 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants