Skip to content

unsafe_binder: implement v0 symbol mangling#154524

Open
GrigorenkoPV wants to merge 1 commit intorust-lang:mainfrom
GrigorenkoPV:mangle_unsafe_binders
Open

unsafe_binder: implement v0 symbol mangling#154524
GrigorenkoPV wants to merge 1 commit intorust-lang:mainfrom
GrigorenkoPV:mangle_unsafe_binders

Conversation

@GrigorenkoPV
Copy link
Copy Markdown
Contributor

@GrigorenkoPV GrigorenkoPV commented Mar 28, 2026

Tracking issue: #130516
Fixes #154367

rustc_demangle also needs to be changed, but they are in a separate repo. I think I will put up a PR there once the suggested mangling is deemed OK.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 28, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Mar 28, 2026

r? @mati865

rustbot has assigned @mati865.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 69 candidates
  • Random selection from 13 candidates

@rust-log-analyzer

This comment has been minimized.

@GrigorenkoPV GrigorenkoPV force-pushed the mangle_unsafe_binders branch from 056837f to 1173efa Compare March 28, 2026 23:48
@mati865
Copy link
Copy Markdown
Member

mati865 commented Mar 29, 2026

I'm not familiar with the process for modifying the mangling spec, but I'd guess this requires some kind of agreement from the Compiler team Maintainers (not just the members) and rustc book update.

Hopefully we get lucky on reroll, otherwise I'll ask on Zulip.
@rustbot reroll

@rustbot rustbot assigned TaKO8Ki and unassigned mati865 Mar 29, 2026
@oli-obk oli-obk assigned oli-obk and unassigned TaKO8Ki Apr 15, 2026
@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Apr 15, 2026

Can we reuse the same trick as #122106 (comment) ?

Essentially turning unsafe binders into a magical symbol from libcore? Needs a bit more than what was done for f32, as there's data after that, but should be workable.

I should totally do the same for pattern types. Happy to do that first to try it out unless you wanna give it a shot for unsafe binders

@GrigorenkoPV
Copy link
Copy Markdown
Contributor Author

If I understand correctly, the approach you are suggesting requires no changes to rustc_demangle, which is nice.


I don't think I have enough time to work on that in the coming days, so I'm okay with you trying pattern types first or maybe even taking over this one too if I'm still busy by then.


Your recent PRs regarding pattern types were a nice reference for me while working on this one and while trying to take a stab at #154871 today. Unfortunately, the latter is still more than what I'm competent enough for.

@jackh726
Copy link
Copy Markdown
Member

@GrigorenkoPV I'm happy to take this over at some point if you're busy. (I have an open item for me to go through and finish up the unsafe binders implementation.)

@oli-obk oli-obk added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 21, 2026
@oli-obk
Copy link
Copy Markdown
Contributor

oli-obk commented Apr 21, 2026

I'll review that work. Marking this PR as blocked for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-blocked Status: Blocked on something else such as an RFC or other implementation work. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ICE due to name mangling not having been implemented yet for unsafe binders

7 participants