@@ -599,8 +599,8 @@ pub struct FormatParam<'tcx> {
599
599
600
600
impl < ' tcx > FormatParam < ' tcx > {
601
601
fn new (
602
- usage : FormatParamUsage ,
603
602
mut kind : FormatParamKind ,
603
+ usage : FormatParamUsage ,
604
604
position : usize ,
605
605
inner : rpf:: InnerSpan ,
606
606
values : & FormatArgsValues < ' tcx > ,
@@ -648,22 +648,22 @@ impl<'tcx> Count<'tcx> {
648
648
Some ( match count {
649
649
rpf:: Count :: CountIs ( val) => Self :: Is ( val, span_from_inner ( values. format_string_span , inner?) ) ,
650
650
rpf:: Count :: CountIsName ( name, _) => Self :: Param ( FormatParam :: new (
651
- usage,
652
651
FormatParamKind :: Named ( Symbol :: intern ( name) ) ,
652
+ usage,
653
653
position?,
654
654
inner?,
655
655
values,
656
656
) ?) ,
657
657
rpf:: Count :: CountIsParam ( _) => Self :: Param ( FormatParam :: new (
658
- usage,
659
658
FormatParamKind :: Numbered ,
659
+ usage,
660
660
position?,
661
661
inner?,
662
662
values,
663
663
) ?) ,
664
664
rpf:: Count :: CountIsStar ( _) => Self :: Param ( FormatParam :: new (
665
- usage,
666
665
FormatParamKind :: Starred ,
666
+ usage,
667
667
position?,
668
668
inner?,
669
669
values,
@@ -837,13 +837,13 @@ impl<'tcx> FormatArgsExpn<'tcx> {
837
837
. map ( |( position, parsed_arg, arg_span) | {
838
838
Some ( FormatArg {
839
839
param : FormatParam :: new (
840
- FormatParamUsage :: Argument ,
841
840
match parsed_arg. position {
842
841
rpf:: Position :: ArgumentImplicitlyIs ( _) => FormatParamKind :: Implicit ,
843
842
rpf:: Position :: ArgumentIs ( _) => FormatParamKind :: Numbered ,
844
843
// NamedInline is handled by `FormatParam::new()`
845
844
rpf:: Position :: ArgumentNamed ( name) => FormatParamKind :: Named ( Symbol :: intern ( name) ) ,
846
845
} ,
846
+ FormatParamUsage :: Argument ,
847
847
position. value ,
848
848
parsed_arg. position_span ,
849
849
& values,
0 commit comments