File tree Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Expand file tree Collapse file tree 3 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -1007,10 +1007,10 @@ impl Literal {
1007
1007
Literal :: _new ( s)
1008
1008
}
1009
1009
1010
- pub fn string ( t : & str ) -> Literal {
1011
- let mut repr = String :: with_capacity ( t . len ( ) + 2 ) ;
1010
+ pub fn string ( string : & str ) -> Literal {
1011
+ let mut repr = String :: with_capacity ( string . len ( ) + 2 ) ;
1012
1012
repr. push ( '"' ) ;
1013
- let mut chars = t . chars ( ) ;
1013
+ let mut chars = string . chars ( ) ;
1014
1014
while let Some ( ch) = chars. next ( ) {
1015
1015
if ch == '\0' {
1016
1016
repr. push_str (
@@ -1035,14 +1035,14 @@ impl Literal {
1035
1035
Literal :: _new ( repr)
1036
1036
}
1037
1037
1038
- pub fn character ( t : char ) -> Literal {
1038
+ pub fn character ( ch : char ) -> Literal {
1039
1039
let mut repr = String :: new ( ) ;
1040
1040
repr. push ( '\'' ) ;
1041
- if t == '"' {
1041
+ if ch == '"' {
1042
1042
// escape_debug turns this into '\"' which is unnecessary.
1043
- repr. push ( t ) ;
1043
+ repr. push ( ch ) ;
1044
1044
} else {
1045
- repr. extend ( t . escape_debug ( ) ) ;
1045
+ repr. extend ( ch . escape_debug ( ) ) ;
1046
1046
}
1047
1047
repr. push ( '\'' ) ;
1048
1048
Literal :: _new ( repr)
Original file line number Diff line number Diff line change @@ -1240,8 +1240,8 @@ impl Literal {
1240
1240
}
1241
1241
1242
1242
/// Byte string literal.
1243
- pub fn byte_string ( s : & [ u8 ] ) -> Literal {
1244
- Literal :: _new ( imp:: Literal :: byte_string ( s ) )
1243
+ pub fn byte_string ( bytes : & [ u8 ] ) -> Literal {
1244
+ Literal :: _new ( imp:: Literal :: byte_string ( bytes ) )
1245
1245
}
1246
1246
1247
1247
/// Returns the span encompassing this literal.
Original file line number Diff line number Diff line change @@ -846,19 +846,19 @@ impl Literal {
846
846
}
847
847
}
848
848
849
- pub fn string ( t : & str ) -> Literal {
849
+ pub fn string ( string : & str ) -> Literal {
850
850
if inside_proc_macro ( ) {
851
- Literal :: Compiler ( proc_macro:: Literal :: string ( t ) )
851
+ Literal :: Compiler ( proc_macro:: Literal :: string ( string ) )
852
852
} else {
853
- Literal :: Fallback ( fallback:: Literal :: string ( t ) )
853
+ Literal :: Fallback ( fallback:: Literal :: string ( string ) )
854
854
}
855
855
}
856
856
857
- pub fn character ( t : char ) -> Literal {
857
+ pub fn character ( ch : char ) -> Literal {
858
858
if inside_proc_macro ( ) {
859
- Literal :: Compiler ( proc_macro:: Literal :: character ( t ) )
859
+ Literal :: Compiler ( proc_macro:: Literal :: character ( ch ) )
860
860
} else {
861
- Literal :: Fallback ( fallback:: Literal :: character ( t ) )
861
+ Literal :: Fallback ( fallback:: Literal :: character ( ch ) )
862
862
}
863
863
}
864
864
You can’t perform that action at this time.
0 commit comments