Draft
Conversation
parse_limited and cleanup more attribute parsingparse_limited
25d63eb to
8bc2d3c
Compare
mejrs
reviewed
Apr 17, 2026
| { | ||
| // `UnknownDiagnosticAttribute` is emitted in rustc_resolve/macros.rs | ||
| return; | ||
| } |
Contributor
There was a problem hiding this comment.
There are a couple of rustc_resolve types that have a pub on_unknown_attr: Option<OnUnknownData> field.
This change makes it so they can be Some even if the feature is not used. The reason you aren't noticing it is because of this check at the use site:
rust/compiler/rustc_resolve/src/imports.rs
Lines 849 to 851 in 4dbafc3
I'm on the fence whether it's worth the effort to "fix" this. But I would like some comments here and there to document whatever we end up with.
This file contains hidden or 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
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.
No description provided.