-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
make #[no_mangle] and #[export_name] items always have external visibility #54414
Conversation
The job Click to expand the log.
I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
Thanks for this! I was actually starting a patch for this as well locally but kept not getting a chance to go back and keep testing it. I think though it's best to fix this by not touching privacy and only touching reachability, as that's basically what's happening here (this isn't messing with privacy, only reachability). I was planning on taking today to work on this, so I don't mind taking this over if you'd prefer! |
Please go ahead. This PR was me procrastinating on some writing I have to do, but it's best if I go back to writing. 😅 |
as discussed in #54135
this appears to work at least on bare functions and statics.
no_mangle
on impl methods doesn't work (yet?). See example below:
After this change a few lints are no longer correct and would need to be
tweaked. e.g.
#[no_mangle] fn foo() {}
is not dead code and doesn't need to bepub
but the compiler raises two warnings about that.r? @alexcrichton