Skip to content

Commit 40e1f7c

Browse files
committed
rollup merge of #20080: seanmonstar/new-show-syntax
First step of #20013. This will allow (after a snapshot) to change all the debug strings from `{}` to `{:?}`. r? @alexcrichton
2 parents 3e5257f + 84b8f31 commit 40e1f7c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/libsyntax/ext/format.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -654,6 +654,7 @@ impl<'a, 'b> Context<'a, 'b> {
654654
Known(ref tyname) => {
655655
match tyname.as_slice() {
656656
"" => "Show",
657+
"?" => "Show",
657658
"e" => "LowerExp",
658659
"E" => "UpperExp",
659660
"o" => "Octal",

src/test/run-pass/ifmt.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ pub fn main() {
6060
t!(format!("{}", 10i), "10");
6161
t!(format!("{}", 10i), "10");
6262
t!(format!("{}", 10u), "10");
63+
t!(format!("{:?}", true), "true");
6364
t!(format!("{:o}", 10u), "12");
6465
t!(format!("{:x}", 10u), "a");
6566
t!(format!("{:X}", 10u), "A");

0 commit comments

Comments
 (0)