Use attribute parser for deprecated attribute checking - #160459
Conversation
|
Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
deprecated attribute checking
This comment has been minimized.
This comment has been minimized.
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
|
|
||
| /// Context of an associated const or associated type (not methods; see [`MethodKind`]). | ||
| #[derive(Copy, Clone, PartialEq, Debug, Eq, StableHash)] | ||
| pub enum AssocKind { |
There was a problem hiding this comment.
Can we reuse the existing AssocCtxt type rather than introducing a new one?
| let attr_span = cx.attr_span; | ||
| cx.emit_lint( | ||
| UNUSED_ATTRIBUTES, | ||
| DeprecatedAnnotationHasNoEffect { span: attr_span }, |
There was a problem hiding this comment.
Does this need to be its own diagnostic rather than just the default Policy::Warn diagnostic?
| let attr_span = cx.attr_span; | ||
| cx.emit_lint( | ||
| UNUSED_ATTRIBUTES, | ||
| DeprecatedAnnotationHasNoEffect { span: attr_span }, |
There was a problem hiding this comment.
Is this path covered by any tests?
|
Reminder, once the PR becomes ready for a review, use |
|
☔ The latest upstream changes (presumably #160761) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
Updates #153101
r? @JonathanBrouwer