@@ -27,8 +27,8 @@ use std::collections::HashMap;
27
27
28
28
#[ derive( PartialEq ) ]
29
29
enum ArgumentType {
30
- Known ( String ) ,
31
- Unsigned
30
+ Placeholder ( String ) ,
31
+ Count ,
32
32
}
33
33
34
34
enum Position {
@@ -182,7 +182,7 @@ impl<'a, 'b> Context<'a, 'b> {
182
182
parse:: ArgumentNamed ( s) => Named ( s. to_string ( ) ) ,
183
183
} ;
184
184
185
- let ty = Known ( arg. format . ty . to_string ( ) ) ;
185
+ let ty = Placeholder ( arg. format . ty . to_string ( ) ) ;
186
186
self . verify_arg_type ( pos, ty) ;
187
187
}
188
188
}
@@ -192,10 +192,10 @@ impl<'a, 'b> Context<'a, 'b> {
192
192
match c {
193
193
parse:: CountImplied | parse:: CountIs ( ..) => { }
194
194
parse:: CountIsParam ( i) => {
195
- self . verify_arg_type ( Exact ( i) , Unsigned ) ;
195
+ self . verify_arg_type ( Exact ( i) , Count ) ;
196
196
}
197
197
parse:: CountIsName ( s) => {
198
- self . verify_arg_type ( Named ( s. to_string ( ) ) , Unsigned ) ;
198
+ self . verify_arg_type ( Named ( s. to_string ( ) ) , Count ) ;
199
199
}
200
200
}
201
201
}
@@ -545,7 +545,7 @@ impl<'a, 'b> Context<'a, 'b> {
545
545
ty : & ArgumentType , arg : P < ast:: Expr > )
546
546
-> P < ast:: Expr > {
547
547
let trait_ = match * ty {
548
- Known ( ref tyname) => {
548
+ Placeholder ( ref tyname) => {
549
549
match & tyname[ ..] {
550
550
"" => "Display" ,
551
551
"?" => "Debug" ,
@@ -564,7 +564,7 @@ impl<'a, 'b> Context<'a, 'b> {
564
564
}
565
565
}
566
566
}
567
- Unsigned => {
567
+ Count => {
568
568
let path = ecx. std_path ( & [ "fmt" , "ArgumentV1" , "from_usize" ] ) ;
569
569
return ecx. expr_call_global ( macsp, path, vec ! [ arg] )
570
570
}
0 commit comments