@@ -947,7 +947,7 @@ impl Punct {
947947            ':' ,  '#' ,  '$' ,  '?' ,  '\'' , 
948948        ] ; 
949949        if  !LEGAL_CHARS . contains ( & ch)  { 
950-             panic ! ( "unsupported character `{:?}`" ,  ch ) ; 
950+             panic ! ( "unsupported character `{ch :?}`" ) ; 
951951        } 
952952        Punct ( bridge:: Punct  { 
953953            ch :  ch as  u8 , 
@@ -1310,7 +1310,7 @@ impl Literal {
13101310    /// String literal. 
13111311#[ stable( feature = "proc_macro_lib2" ,  since = "1.29.0" ) ]  
13121312    pub  fn  string ( string :  & str )  -> Literal  { 
1313-         let  quoted = format ! ( "{:?}" ,  string ) ; 
1313+         let  quoted = format ! ( "{string :?}" ) ; 
13141314        assert ! ( quoted. starts_with( '"' )  && quoted. ends_with( '"' ) ) ; 
13151315        let  symbol = & quoted[ 1 ..quoted. len ( )  - 1 ] ; 
13161316        Literal :: new ( bridge:: LitKind :: Str ,  symbol,  None ) 
@@ -1319,7 +1319,7 @@ impl Literal {
13191319    /// Character literal. 
13201320#[ stable( feature = "proc_macro_lib2" ,  since = "1.29.0" ) ]  
13211321    pub  fn  character ( ch :  char )  -> Literal  { 
1322-         let  quoted = format ! ( "{:?}" ,  ch ) ; 
1322+         let  quoted = format ! ( "{ch :?}" ) ; 
13231323        assert ! ( quoted. starts_with( '\'' )  && quoted. ends_with( '\'' ) ) ; 
13241324        let  symbol = & quoted[ 1 ..quoted. len ( )  - 1 ] ; 
13251325        Literal :: new ( bridge:: LitKind :: Char ,  symbol,  None ) 
0 commit comments