@@ -486,7 +486,7 @@ impl<'a, 'b> Context<'a, 'b> {
486
486
let sp = self . macsp ;
487
487
let count = |c, arg| {
488
488
let mut path = Context :: rtpath ( self . ecx , "Count" ) ;
489
- path. push ( self . ecx . ident_of ( c) ) ;
489
+ path. push ( self . ecx . ident_of ( c, sp ) ) ;
490
490
match arg {
491
491
Some ( arg) => self . ecx . expr_call_global ( sp, path, vec ! [ arg] ) ,
492
492
None => self . ecx . expr_path ( self . ecx . path_global ( sp, path) ) ,
@@ -534,7 +534,7 @@ impl<'a, 'b> Context<'a, 'b> {
534
534
let pos = {
535
535
let pos = |c, arg| {
536
536
let mut path = Context :: rtpath ( self . ecx , "Position" ) ;
537
- path. push ( self . ecx . ident_of ( c) ) ;
537
+ path. push ( self . ecx . ident_of ( c, sp ) ) ;
538
538
match arg {
539
539
Some ( i) => {
540
540
let arg = self . ecx . expr_usize ( sp, i) ;
@@ -603,7 +603,7 @@ impl<'a, 'b> Context<'a, 'b> {
603
603
let fill = self . ecx . expr_lit ( sp, ast:: LitKind :: Char ( fill) ) ;
604
604
let align = |name| {
605
605
let mut p = Context :: rtpath ( self . ecx , "Alignment" ) ;
606
- p. push ( self . ecx . ident_of ( name) ) ;
606
+ p. push ( self . ecx . ident_of ( name, sp ) ) ;
607
607
self . ecx . path_global ( sp, p)
608
608
} ;
609
609
let align = match arg. format . align {
@@ -621,11 +621,11 @@ impl<'a, 'b> Context<'a, 'b> {
621
621
sp,
622
622
path,
623
623
vec ! [
624
- self . ecx. field_imm( sp, self . ecx. ident_of( "fill" ) , fill) ,
625
- self . ecx. field_imm( sp, self . ecx. ident_of( "align" ) , align) ,
626
- self . ecx. field_imm( sp, self . ecx. ident_of( "flags" ) , flags) ,
627
- self . ecx. field_imm( sp, self . ecx. ident_of( "precision" ) , prec) ,
628
- self . ecx. field_imm( sp, self . ecx. ident_of( "width" ) , width) ,
624
+ self . ecx. field_imm( sp, self . ecx. ident_of( "fill" , sp ) , fill) ,
625
+ self . ecx. field_imm( sp, self . ecx. ident_of( "align" , sp ) , align) ,
626
+ self . ecx. field_imm( sp, self . ecx. ident_of( "flags" , sp ) , flags) ,
627
+ self . ecx. field_imm( sp, self . ecx. ident_of( "precision" , sp ) , prec) ,
628
+ self . ecx. field_imm( sp, self . ecx. ident_of( "width" , sp ) , width) ,
629
629
] ,
630
630
) ;
631
631
@@ -634,8 +634,8 @@ impl<'a, 'b> Context<'a, 'b> {
634
634
sp,
635
635
path,
636
636
vec ! [
637
- self . ecx. field_imm( sp, self . ecx. ident_of( "position" ) , pos) ,
638
- self . ecx. field_imm( sp, self . ecx. ident_of( "format" ) , fmt) ,
637
+ self . ecx. field_imm( sp, self . ecx. ident_of( "position" , sp ) , pos) ,
638
+ self . ecx. field_imm( sp, self . ecx. ident_of( "format" , sp ) , fmt) ,
639
639
] ,
640
640
) )
641
641
}
@@ -653,7 +653,7 @@ impl<'a, 'b> Context<'a, 'b> {
653
653
let mut heads = Vec :: with_capacity ( self . args . len ( ) ) ;
654
654
655
655
let names_pos: Vec < _ > = ( 0 ..self . args . len ( ) )
656
- . map ( |i| ast :: Ident :: from_str_and_span ( & format ! ( "arg{}" , i) , self . macsp ) )
656
+ . map ( |i| self . ecx . ident_of ( & format ! ( "arg{}" , i) , self . macsp ) )
657
657
. collect ( ) ;
658
658
659
659
// First, build up the static array which will become our precompiled
0 commit comments