Skip to content
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

v0: demangle structural constants and &str. #55

Merged
merged 4 commits into from
Aug 24, 2021

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented Aug 10, 2021

This is the demangling counterpart to rust-lang/rust#87194.
Opening as a draft PR until the RFC change (yet to be published) is accepted.

Also, all but the last 4 commits are prerequisites, I'll open a separate PR for them.
(EDIT: prerequisite PR is up at #56)

(EDIT2: prerequisite PR got merged)

cc @michaelwoerister

alexcrichton added a commit that referenced this pull request Aug 10, 2021
Prerequisites for "v0: demangle structural constants and &str" (#55).
@michaelwoerister
Copy link
Member

@eddyb, I think we can take this out of draft mode since we decided to go ahead and merge the implementation for experimentation before merging the RFC.

@eddyb eddyb marked this pull request as ready for review August 24, 2021 08:55
@eddyb
Copy link
Member Author

eddyb commented Aug 24, 2021

@eddyb, I think we can take this out of draft mode since we decided to go ahead and merge the implementation for experimentation before merging the RFC.

Done, just needs a review now.

@alexcrichton
Copy link
Member

Looks reasonable to me, thanks!

@alexcrichton alexcrichton merged commit 670f024 into rust-lang:main Aug 24, 2021
@eddyb eddyb deleted the const-values branch August 24, 2021 16:02
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2021
…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: rust-lang/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`
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.

3 participants