Allow (but don't require) #[unsafe(naked)] so that compiler-builtins can upgrade to it#5
Closed
Allow (but don't require) #[unsafe(naked)] so that compiler-builtins can upgrade to it#5
Conversation
🔍 PR Link Analysis🔗 Ranked Links#1 rust-lang/rust#139753🔍 The #2 rust-lang/rust#138997🔍 The #3 rust-lang/rust#134213 (comment)🔍 The #4 #t-compiler/help > updating `compiler-builtins` and `rustc`🔍 The |
This was referenced Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Rust: https://rocket.rs/
tracking issue: rust-lang/rust#138997
Per rust-lang/rust#134213 (comment), we want to make the
#[naked]attribute an unsafe attribute. Making that change runs into a cyclic dependency withcompiler-builtinswhich uses#[naked], whererustcneeds an updatedcompiler-builtinsand vice versa.So based on rust-lang/rust#139753 and #t-compiler/help > updating `compiler-builtins` and `rustc`, this PR allows, but does not require
#[unsafe(naked)], and makes that change for some of the tests to check that both#[naked]and#[unsafe(naked)]are accepted.Then we can upgrade and synchronize
compiler-builtins, and then make#[naked](withoutunsafe) invalid.r? @traviscross (or someone from t-compiler if you're faster and this look allright)