Use format args capture#100589
Use format args capture#100589Rageking8 wants to merge 3 commits intorust-lang:masterfrom Rageking8:use-format-args-capture
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. |
| 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.
Mixing different types of capture in one format string isn't nice.
There was a problem hiding this comment.
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.