Skip to content

Commit

Permalink
add {:?} fmt syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Dec 20, 2014
1 parent 8443b09 commit 84b8f31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libsyntax/ext/format.rs
Expand Up @@ -654,6 +654,7 @@ impl<'a, 'b> Context<'a, 'b> {
Known(ref tyname) => {
match tyname.as_slice() {
"" => "Show",
"?" => "Show",
"e" => "LowerExp",
"E" => "UpperExp",
"o" => "Octal",
Expand Down
1 change: 1 addition & 0 deletions src/test/run-pass/ifmt.rs
Expand Up @@ -60,6 +60,7 @@ pub fn main() {
t!(format!("{}", 10i), "10");
t!(format!("{}", 10i), "10");
t!(format!("{}", 10u), "10");
t!(format!("{:?}", true), "true");
t!(format!("{:o}", 10u), "12");
t!(format!("{:x}", 10u), "a");
t!(format!("{:X}", 10u), "A");
Expand Down

0 comments on commit 84b8f31

Please sign in to comment.