-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Use format args capture #100589
Use format args capture #100589
Conversation
lexer\mod lexer\tokentrees lexer\unicode_chars lexer\unescape_error_reporting
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jackh726 (or someone else) soon. Please see the contribution instructions for more information. |
This comment has been minimized.
This comment has been minimized.
FTR, if you intend to file subsequent PRs, I would suggest waiting for rust-lang/rust-clippy#9233 and then using rustfix rather than doing it manually (I hope it's rustfix-able?). |
parser\attr parser\expr parser\attr_wrapper
Yeah, thanks a bunch for the contributions! but doing these manually is a bit of a waste of time compared to automating the fix. |
@@ -131,7 +131,7 @@ impl<'a> StringReader<'a> { | |||
) -> DiagnosticBuilder<'a, !> { | |||
self.sess | |||
.span_diagnostic | |||
.struct_span_fatal(self.mk_sp(from_pos, to_pos), &format!("{}: {}", m, escaped_char(c))) | |||
.struct_span_fatal(self.mk_sp(from_pos, to_pos), &format!("{m}: {}", escaped_char(c))) |
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.
Mixing different types of capture in one format string isn't nice.
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.
I think it should be fine, since they are all pretty short and in order. But, I can revert those if necessary.
Yes, this lint will be rustfix-able. |
☔ The latest upstream changes (presumably #100497) made this pull request unmergeable. Please resolve the merge conflicts. |
Use format args capture is some places to make the usage more uniform.