@@ -88,8 +88,8 @@ struct Context<'a, 'b> {
88
88
/// * Implicit argument resolution: `"{1:.0$} {2:.foo$} {1:.3$} {4:.0$}"`
89
89
/// * Name resolution: `"{1:.0$} {2:.5$} {1:.3$} {4:.0$}"`
90
90
/// * `count_positions` (in JSON): `{0: 0, 5: 1, 3: 2}`
91
- /// * `count_args`: `vec![Exact(0), Exact(5), Exact(3) ]`
92
- count_args : Vec < Position > ,
91
+ /// * `count_args`: `vec![0, 5, 3 ]`
92
+ count_args : Vec < usize > ,
93
93
/// Relative slot numbers for count arguments.
94
94
count_positions : FxHashMap < usize , usize > ,
95
95
/// Number of count slots assigned.
@@ -513,7 +513,7 @@ impl<'a, 'b> Context<'a, 'b> {
513
513
if let Entry :: Vacant ( e) = self . count_positions . entry ( arg) {
514
514
let i = self . count_positions_count ;
515
515
e. insert ( i) ;
516
- self . count_args . push ( Exact ( arg) ) ;
516
+ self . count_args . push ( arg) ;
517
517
self . count_positions_count += 1 ;
518
518
}
519
519
}
@@ -774,11 +774,7 @@ impl<'a, 'b> Context<'a, 'b> {
774
774
// (the span is otherwise unavailable in MIR)
775
775
heads. push ( self . ecx . expr_addr_of ( e. span . with_ctxt ( self . macsp . ctxt ( ) ) , e) ) ;
776
776
}
777
- for pos in self . count_args {
778
- let index = match pos {
779
- Exact ( i) => i,
780
- _ => panic ! ( "should never happen" ) ,
781
- } ;
777
+ for index in self . count_args {
782
778
let span = spans_pos[ index] ;
783
779
args. push ( Context :: format_arg ( self . ecx , self . macsp , span, & Count , index) ) ;
784
780
}
0 commit comments