File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -711,8 +711,8 @@ pub struct FormatSpec<'tcx> {
711
711
pub fill : Option < char > ,
712
712
/// Optionally specified alignment.
713
713
pub align : Alignment ,
714
- /// Packed version of various flags provided, see [`rustc_parse_format::Flag`] .
715
- pub flags : u32 ,
714
+ /// Whether all flag options are set to default (no flags specified) .
715
+ pub no_flags : bool ,
716
716
/// Represents either the maximum width or the integer precision.
717
717
pub precision : Count < ' tcx > ,
718
718
/// The minimum width, will be padded according to `width`/`align`
@@ -728,7 +728,7 @@ impl<'tcx> FormatSpec<'tcx> {
728
728
Some ( Self {
729
729
fill : spec. fill ,
730
730
align : spec. align ,
731
- flags : spec. flags ,
731
+ no_flags : spec. sign . is_none ( ) && !spec . alternate && !spec . zero_pad && spec . debug_hex . is_none ( ) ,
732
732
precision : Count :: new (
733
733
FormatParamUsage :: Precision ,
734
734
spec. precision ,
@@ -773,7 +773,7 @@ impl<'tcx> FormatSpec<'tcx> {
773
773
self . width . is_implied ( )
774
774
&& self . precision . is_implied ( )
775
775
&& self . align == Alignment :: AlignUnknown
776
- && self . flags == 0
776
+ && self . no_flags
777
777
}
778
778
}
779
779
You can’t perform that action at this time.
0 commit comments