add {:?} fmt syntax

This commit is contained in:
Sean McArthur 2014-12-20 00:32:07 -08:00
parent 8443b09e36
commit 84b8f318a5
2 changed files with 2 additions and 0 deletions

View File

@ -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",

View File

@ -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");