-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Special treatment empty tuple when suggest adding a string literal in format macro. #131430
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
689cf08
to
c1771b9
Compare
r? @jieyouxu |
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.
Thanks, some last minor nits then r=me.
… format macro. For example: ```rust let s = "123"; println!({}, "sss", s); ``` Suggest: `println!("{:?} {} {}", {}, "sss", s);` fixes rust-lang#130170
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.
Thanks, r=me after PR CI is green.
Done. Thank you. |
@bors r+ rollup |
Special treatment empty tuple when suggest adding a string literal in format macro. For example: ```rust let s = "123"; println!({}, "sss", s); ``` Suggest: `println!("{:?} {} {}", {}, "sss", s);` fixes rust-lang#130170
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129424 (Stabilize `Pin::as_deref_mut()`) - rust-lang#131332 (Fix clobber_abi and disallow SVE-related registers in Arm64EC inline assembly) - rust-lang#131384 (Update precondition tests (especially for zero-size access to null)) - rust-lang#131430 (Special treatment empty tuple when suggest adding a string literal in format macro.) - rust-lang#131550 (Make some tweaks to extern block diagnostics) - rust-lang#131667 (Fix AArch64InlineAsmReg::emit) - rust-lang#131679 (compiletest: Document various parts of compiletest's `lib.rs`) - rust-lang#131682 (Tag PRs affecting compiletest with `A-compiletest`) Failed merges: - rust-lang#131496 (Stabilise `const_make_ascii`.) r? `@ghost` `@rustbot` modify labels: rollup
…iaskrgr Rollup of 8 pull requests Successful merges: - rust-lang#129424 (Stabilize `Pin::as_deref_mut()`) - rust-lang#131332 (Fix clobber_abi and disallow SVE-related registers in Arm64EC inline assembly) - rust-lang#131384 (Update precondition tests (especially for zero-size access to null)) - rust-lang#131430 (Special treatment empty tuple when suggest adding a string literal in format macro.) - rust-lang#131550 (Make some tweaks to extern block diagnostics) - rust-lang#131667 (Fix AArch64InlineAsmReg::emit) - rust-lang#131679 (compiletest: Document various parts of compiletest's `lib.rs`) - rust-lang#131682 (Tag PRs affecting compiletest with `A-compiletest`) Failed merges: - rust-lang#131496 (Stabilise `const_make_ascii`.) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#131430 - surechen:fix_130495, r=jieyouxu Special treatment empty tuple when suggest adding a string literal in format macro. For example: ```rust let s = "123"; println!({}, "sss", s); ``` Suggest: `println!("{:?} {} {}", {}, "sss", s);` fixes rust-lang#130170
For example:
Suggest:
println!("{:?} {} {}", {}, "sss", s);
fixes #130170