-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Suggest quoting unquoted idents in attrs #119341
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
e1e9de3
to
72d44e3
Compare
This comment has been minimized.
This comment has been minimized.
72d44e3
to
3b8e673
Compare
3b8e673
to
e99984c
Compare
@rustbot review |
.dcx() | ||
.create_err(InvalidMetaItem { span: self.token.span, token: self.token.clone() })) | ||
let token = self.token.clone(); | ||
let (sugg, or_ident) = if self.prev_token == token::Eq && !self.token.span.from_expansion() |
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.
Please add a comment about what this check does, exactly, and why we only accept identifiers in the else
(I'm also pretty sure identifiers are unrelated to expansions?...)
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.
Added a comment explaining the check, including the from_expansion()
.
why we only accept identifiers in the
else
From briefly glancing over attributes-related tests, it seemed like the "or identifier" would be valid for the remaining cases covered by the else branch, e.g.
//~^ ERROR expected unsuffixed literal or identifier, found `n!()` |
@rustbot review
e99984c
to
dafb15a
Compare
☔ The latest upstream changes (presumably #119578) made this pull request unmergeable. Please resolve the merge conflicts. |
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 looks good to me! 🙂
Please rebase this PR to resolve conflicts.
Marking as
S-waiting-on-author
@rustbot review
(learn more about rustbot commands). @rustbot author.
Rebased, thanks for the help. @rustbot review |
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (aa5f781): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 664.704s -> 666.086s (0.21%) |
Closes #58462