Skip to content

use #[naked] as an unsafe attribute #817

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

folkertdev
Copy link
Contributor

Per rust-lang/rust#134213 (comment), we want to make the #[naked] attribute an unsafe attribute.

Based on the CI failures here rust-lang/rust#139753, I believe that compiler-builtins need to be updated first.

@tgross35
Copy link
Contributor

tgross35 commented Apr 14, 2025

Would it be possible for rustc to accept both forms until this gets updated, to bootstrap this? Unfortunately I don't know if we could merge and release this with the failures here.

Another case where a subtree would be nice...

Edit: I see rust-lang/rust#139797 now

@folkertdev
Copy link
Contributor Author

folkertdev commented Apr 14, 2025

Right, yeah not ideal but we'll make it work. This PR will then likely needs some #[allow(unused-unsafe)]s for a bit too while we make this change, but we'll see when that PR makes it into a nightly build.

@folkertdev folkertdev closed this Apr 16, 2025
@folkertdev folkertdev reopened this Apr 16, 2025
@folkertdev
Copy link
Contributor Author

Allright, this works now that rust-lang/rust#139797 is in nightly. After merging this, I guess the next step is to create a release of compiler-builtins, and then make rustc use that new release?

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.

2 participants