-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
add naked_functions_target_feature
unstable feature
#138570
Merged
bors
merged 1 commit into
rust-lang:master
from
folkertdev:naked-function-target-feature-gate
Mar 21, 2025
Merged
add naked_functions_target_feature
unstable feature
#138570
bors
merged 1 commit into
rust-lang:master
from
folkertdev:naked-function-target-feature-gate
Mar 21, 2025
+67
−8
Conversation
This file contains 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
Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
This comment has been minimized.
This comment has been minimized.
e92560c
to
c261426
Compare
@bors r+ |
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Mar 21, 2025
…eature-gate, r=Amanieu add `naked_functions_target_feature` unstable feature tracking issue: rust-lang#138568 tagging rust-lang#134213 rust-lang#90957 This PR puts `#[target_feature(/* ... */)]` on `#[naked]` functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supporting `target_feature` on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds. Note that at the time of writing, the `target_features` attribute is ignored when generating code for naked functions. r? `@Amanieu`
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
Rollup of 10 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
…iaskrgr Rollup of 10 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) - rust-lang#138728 (Update `compiler-builtins` to 0.1.152) r? `@ghost` `@rustbot` modify labels: rollup try-job: aarch64-apple try-job: x86_64-msvc-1 try-job: x86_64-gnu try-job: dist-i586-gnu-i586-i686-musl
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
…iaskrgr Rollup of 9 pull requests Successful merges: - rust-lang#138364 (ports the compiler test cases to new rust_intrinsic format) - rust-lang#138570 (add `naked_functions_target_feature` unstable feature) - rust-lang#138623 ([bootstrap] Use llvm_runtimes for compiler-rt) - rust-lang#138627 (Autodiff cleanups) - rust-lang#138669 (tests: accept some noise from LLVM 21 in symbols-all-mangled) - rust-lang#138706 (Improve bootstrap git modified path handling) - rust-lang#138709 (Update GCC submodule) - rust-lang#138717 (Add an attribute that makes the spans from a macro edition 2021, and fix pin on edition 2024 with it) - rust-lang#138721 (Use explicit cpu in some asm and codegen tests.) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Mar 21, 2025
Rollup merge of rust-lang#138570 - folkertdev:naked-function-target-feature-gate, r=Amanieu add `naked_functions_target_feature` unstable feature tracking issue: rust-lang#138568 tagging rust-lang#134213 rust-lang#90957 This PR puts `#[target_feature(/* ... */)]` on `#[naked]` functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supporting `target_feature` on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds. Note that at the time of writing, the `target_features` attribute is ignored when generating code for naked functions. r? ``@Amanieu``
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-attributes
Area: Attributes (`#[…]`, `#![…]`)
F-naked_functions_target_feature
`#![feature(naked_functions_target_feature)]`
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
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.
tracking issue: #138568
tagging #134213 #90957
This PR puts
#[target_feature(/* ... */)]
on#[naked]
functions behind its own feature gate, so that naked functions can be stabilized. It turns out that supportingtarget_feature
on naked functions is tricky on some targets, so we're splitting it out to not block stabilization of naked functions themselves. See the tracking issue for more information and workarounds.Note that at the time of writing, the
target_features
attribute is ignored when generating code for naked functions.r? @Amanieu