- 
        Couldn't load subscription status. 
- Fork 13.9k
          Port #[may_dangle] to the new attribute system
          #142539
        
          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
Conversation
| Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_passes/src/check_attr.rs | 
| // FIXME: should not be needed anymore when all attrs are parsed | ||
| Attribute::Parsed(AttributeKind::Deprecation { span, .. }) => *span, | ||
| Attribute::Parsed(AttributeKind::DocComment { span, .. }) => *span, | ||
| Attribute::Parsed(AttributeKind::MayDangle(span)) => *span, | 
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.
same feedback as on the other PR. This list should be kept as small as possible and was only introduced for migration purposes. I expect this entire function to be removed.
| @rustbot author | 
| Reminder, once the PR becomes ready for a review, use  | 
f2ffea0    to
    d4006e4      
    Compare
  
    d4006e4    to
    76dfb1c      
    Compare
  
    | ☔ The latest upstream changes (presumably #138165) made this pull request unmergeable. Please resolve the merge conflicts. | 
| @GrigorenkoPV could you rebase? Then I'll give it one more pass and we can merge | 
76dfb1c    to
    1ddede1      
    Compare
  
    | ☔ The latest upstream changes (presumably #142697) made this pull request unmergeable. Please resolve the merge conflicts. | 
1ddede1    to
    37bc3f6      
    Compare
  
    | self.check_applied_to_fn_or_method(hir_id, *attr_span, span, target) | ||
| } | ||
| &Attribute::Parsed(AttributeKind::MayDangle(attr_span)) => { | ||
| // Check if `#[may_dangle]` is applied to a lifetime or type generic parameter in `Drop` impl. | 
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 should be in its own function, not here, just like other validation logic usually isn't
| ☔ The latest upstream changes (presumably #142770) made this pull request unmergeable. Please resolve the merge conflicts. | 
37bc3f6    to
    045faa8      
    Compare
  
    | @bors r+ rollup | 
Rollup of 3 pull requests Successful merges: - #142539 (Port `#[may_dangle]` to the new attribute system) - #142690 (expand: Remove some unnecessary generic parameters) - #142698 (Improve diagnostics for `concat_bytes!` with C string literals) Failed merges: - #142600 (Port `#[rustc_pub_transparent]` to the new attribute system) - #142776 (All HIR attributes are outer) r? `@ghost` `@rustbot` modify labels: rollup
Very similar to #142498.
This is a part of #131229, so
r? @jdonszelmann