-
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
v0 mangled symbol doesn't match specification nor can it be demangled with rustfilt or c++filt #83611
Comments
🙄 So, I'm not familiar at all with this (in fact, I didn't even realize we had a spec for symbol mangling until I saw this). But let's see. I'm just looking at
It seems like where we expect the Did you actually bisect to #79945 or is that a guess? |
Oh, I see what's happening, I think |
I guess we're lowering
whereas it was
before. This is a bit interesting, because the (slightly desugared)
I have to think about this. The mangling is very much of the non-lowered version. There is an easy fix here: just don't print the binders of I am actually curious if the I may or may not be able to get to this myself in the next couple days, but should be easy enough to fix for anyone interested; I can mentor as needed. |
Which is the part of the code that prints the binder? rust/compiler/rustc_symbol_mangling/src/v0.rs Lines 497 to 502 in 4a20eb6
I am potentially interested in implementing this :) @rustbot claim |
It's the |
There's a single type with multiple bounds, so I would prefer keeping a single binder IMO (tho I can see us having to change the mangling if You can basically work around having a different implementation, by having the bound-lifetime anonymizing process work for you. Any |
So does that mean I need a different approach from #83611 (comment)? I haven't interacted with the trait-solving-related code that much, so I would appreciate if you could give me more detail on how I would implement what you're suggesting :) Alternatively, I could open a PR using |
I think what @eddyb is saying roughly lines up with my comment. @camelid I think just open a PR with my approach.
I imagine this is a "single binder" in the mangling, not in the predicate list.
I don't quite follow this. Maybe this referring to multiple bound traits? Lifetimes bound in |
Right, sorry for the ambiguity.
Sure, but how confident are you some kind of strange interaction can't create something that seems to be out of sync? Anyway, if we check instead of assuming it, it should be fine.
This doesn't work, it will keep I think you should move the I was worried this would mess with the anonymization but that doesn't seem to happen here (instead, mangling just assumes anonymization happened and will ICE if it didn't). |
|
Fix v0 symbol mangling bug Fixes rust-lang#83611. r? `@jackh726`
For program below, mangled symbol doesn't match specification nor can it be demangled with rustfilt or c++filt (with rust v0 support):
Partial derivation
The text was updated successfully, but these errors were encountered: