-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix inconsistent symbol mangling of integers constants with -Zverbose #94359
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
//[v0]~| ERROR demangling-alt(<c::Signed<-152>>::f) | ||
//[legacy]~^^^^ ERROR symbol-name(_ZN1c22Signed$LT$.152_i16$GT$ | ||
//[legacy]~| ERROR demangling(c::Signed<.152_i16>::f:: | ||
//[legacy]~| ERROR demangling-alt(c::Signed<.152_i16>::f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The .
instead of -
seems quite surprising, but preexisting. Apparently -
, :
and .
are mangled the same way, and demangled as .
.
7ed040e
to
09c1d9f
Compare
The existing v0 tests have been slightly adjusted for compatibility with legacy mangler, which requires an item to have an ancestor in a value namespace or a type namespace to produce a symbol for it. In v0 mangling this results in an extra `Nv` component.
09c1d9f
to
8fc60c0
Compare
r=me with comments #94359 (comment) added. |
The `PrettyPrinter` changes formatting of array size and integer constants based on `-Zverbose`, so its implementation cannot be used in legacy symbol mangling.
8fc60c0
to
99a7779
Compare
@bors r+ |
📌 Commit 99a7779 has been approved by |
…askrgr Rollup of 3 pull requests Successful merges: - rust-lang#94359 (Fix inconsistent symbol mangling of integers constants with -Zverbose) - rust-lang#94465 (6 - Make more use of `let_chains`) - rust-lang#94470 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
The
PrettyPrinter
changes formatting of array size and integerconstants based on
-Zverbose
, so its implementation cannot be used inlegacy symbol mangling.
Example symbol demangling before changes: