rustc_symbol_mangling: support structural constants and &str in v0. #87194
Conversation
Nice! Thanks for moving on that so quickly, @eddyb! For reference, here is a link to the current grammar: https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md#syntax-of-mangled-names |
And here is the relevant part of the grammar that this PR will supersede:
|
This looks great! So now we just need support for this to land in |
This comment has been hidden.
This comment has been hidden.
I extended LLVM Rust demangler with support for proposed grammar. Apart from issue with Since you are also updating the test cases here. I remember having to change the |
This comment has been hidden.
This comment has been hidden.
Great catch, @tmiasko! |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
What remains to be done here? Can I help move this along somehow? |
If I understand correctly the sequence for making progress here is:
Does that sound right, @eddyb & @tmiasko? EDIT: Only the first three steps are needed to merge this PR. |
Apologies for not leaving a comment with the status, I've had an in-progress |
Demangling PR up at alexcrichton/rustc-demangle#55 - next step is submitting the RFC amendment, I'll try to get to that later today. |
I've opened the RFC amendment PR (rust-lang/rfcs#3161 - should someone FCP it?) and just pushed a few commits with We've already done a crater run through #85530, so I think we're only blocked on the RFC amendment (and reviews, I guess? if any are left). |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
r? @oli-obk |
From my point of view this looks good to go! Maybe @oli-obk wants to have a closer look at the interactions with const-eval? |
@bors r=michaelwoerister,oli-obk |
|
@bors rollup=never |
…woerister,oli-obk rustc_symbol_mangling: support structural constants and &str in v0. This PR should unblock rust-lang#85530 (except for float `const` generics, which AFAIK should've never worked). (cc `@tmiasko` could the rust-lang#85530 (comment) failures be retried with a quick crater "subset" run of this PR + changing the default to `v0`? Just to make sure I didn't miss anything other than the floats) The encoding is the one suggested before in e.g. rust-lang#61486 (comment), tho this PR won't by itself finish rust-lang#61486, before closing that we'd likely want to move to `@oli-obk's` "valtrees" (i.e. rust-lang#83234 and other associated work). <hr> **EDITs**: 1. switched unit/tuple/braced-with-named-fields `<const-fields>` prefixes from `"u"`/`"T"`/`""` to `"U"`/`"T"`/`"S"` to avoid the ambiguity reported by `@tmiasko` in rust-lang#87194 (comment). 2. `rustc-demangle` PR: alexcrichton/rustc-demangle#55 3. RFC amendment PR: rust-lang/rfcs#3161 * also removed the grammar changes included in that PR, from this description 4. added tests (temporarily using my fork of `rustc-demangle`) <hr> r? `@michaelwoerister`
This comment has been hidden.
This comment has been hidden.
|
Hopefully #87194 (comment) is fixed by the new commit to @bors r=michaelwoerister,oli-obk |
|
|
This PR should unblock #85530 (except for float
const
generics, which AFAIK should've never worked).(cc @tmiasko could the #85530 (comment) failures be retried with a quick crater "subset" run of this PR + changing the default to
v0
? Just to make sure I didn't miss anything other than the floats)The encoding is the one suggested before in e.g. #61486 (comment), tho this PR won't by itself finish #61486, before closing that we'd likely want to move to @oli-obk's "valtrees" (i.e. #83234 and other associated work).
EDITs:
switched unit/tuple/braced-with-named-fields
<const-fields>
prefixes from"u"
/"T"
/""
to"U"
/"T"
/"S"
to avoid the ambiguity reported by @tmiasko in #87194 (comment).rustc-demangle
PR: alexcrichton/rustc-demangle#55RFC amendment PR: rust-lang/rfcs#3161
added tests (temporarily using my fork of
rustc-demangle
)r? @michaelwoerister