Repository navigation
#[naked]: report incompatible attributes - #127853
Merged
Merged
Conversation
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.
tracking issue: #90957
this is a re-implementation of #93809 by @bstrie which was closed 2 years ago due to inactivity.
This PR takes some of the final comments into account, specifically providing a little more context in error messages, and using an allow list to determine which attributes are compatible with
#[naked].Notable attributes that are incompatible with
#[naked]are:#[inline]#[track_caller](this is now allowed, see PR discussion)#[target_feature]#[test],#[ignore],#[should_panic]These attributes just directly conflict with what
#[naked]should do.Naked functions are still important for systems programming, embedded, and operating systems, so I'd like to move them forward.