-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Suggest a positional formatting argument instead of a captured argument #100058
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 a positional formatting argument instead of a captured argument #100058
Conversation
Can you add tests for different format arg types, like Debug |
☔ The latest upstream changes (presumably #100063) made this pull request unmergeable. Please resolve the merge conflicts. |
c01bb16
to
a0a2ec3
Compare
@compiler-errors I added them! |
let byte_pos = self.to_span_index(end); | ||
let start = InnerOffset(byte_pos.0 + 1); | ||
let field = self.argument(start); | ||
if !self.consume('}') { |
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.
Can we add a comment stating "We can only parse foo.bar
field access, any deeper nesting, or another type of expression, like method calls, are not supported".
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.
Couple of nitpicks, r=me after addressing them.
@bors r+ |
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#98796 (Do not exclusively suggest `;` when `,` is also a choice) - rust-lang#99772 (Re-enable submodule archive downloads.) - rust-lang#100058 (Suggest a positional formatting argument instead of a captured argument) - rust-lang#100093 (Enable unused_parens for match arms) - rust-lang#100095 (More EarlyBinder cleanups) - rust-lang#100138 (Remove more Clean trait implementations) - rust-lang#100148 (RustWrapper: update for TypedPointerType in LLVM) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This patch fixes a part of #96999.
fixes #98241
fixes #97311
r? @estebank