- 
                Notifications
    
You must be signed in to change notification settings  - Fork 559
 
          Update naked to use the attribute template
          #1908
        
          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
base: master
Are you sure you want to change the base?
Conversation
        
          
                src/attributes/codegen.md
              
                Outdated
          
        
      | - [Free functions][items.fn] | ||
| - [Inherent associated functions][items.associated.fn] | ||
| - [Trait impl functions][items.impl.trait] | ||
| - [Trait definition functions][items.traits] with a body | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this work
| - [Trait definition functions][items.traits] with a body | |
| - [Trait][items.traits] [associated functions][items.associated.fn] with a body | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wording can be ambiguous, since it is unclear if it is an associated function in a trait definition or a trait impl. The original wording was specifically chosen to avoid that ambiguity and contrast with the previous item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initially wanted to link this to items.traits.associated-item-decls, due to being more specific, because items.traits was too general
- [Trait definition functions][items.traits.associated-item-decls] with a body
 
is that alright
| 
           just 1 comment, otherwise this is good  | 
    
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
To follow the attribute template, and to simplify the wording a little.
Naked attributes cannot have the "Rust" ABI. https://github.com/rust-lang/rust/blob/aae43c4532690153af7465227816c93036bb1604/compiler/rustc_passes/src/check_attr.rs#L641-L652
More closely align with the template, and some minor word tweaks.
| 
           This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.  | 
    
New rules:
attributes.codegen.naked.syntaxattributes.codegen.naked.allowed-positionsattributes.codegen.naked.duplicatesattributes.codegen.naked.target_featureattributes.codegen.naked.abiRenamed rules:
attributes.codegen.naked.unsafe-attributeis nowattributes.codegen.naked.unsafe