File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 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> {
711711 pub fill : Option < char > ,
712712 /// Optionally specified alignment.
713713 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 ,
716716 /// Represents either the maximum width or the integer precision.
717717 pub precision : Count < ' tcx > ,
718718 /// The minimum width, will be padded according to `width`/`align`
@@ -728,7 +728,7 @@ impl<'tcx> FormatSpec<'tcx> {
728728 Some ( Self {
729729 fill : spec. fill ,
730730 align : spec. align ,
731- flags : spec. flags ,
731+ no_flags : spec. sign . is_none ( ) && !spec . alternate && !spec . zero_pad && spec . debug_hex . is_none ( ) ,
732732 precision : Count :: new (
733733 FormatParamUsage :: Precision ,
734734 spec. precision ,
@@ -773,7 +773,7 @@ impl<'tcx> FormatSpec<'tcx> {
773773 self . width . is_implied ( )
774774 && self . precision . is_implied ( )
775775 && self . align == Alignment :: AlignUnknown
776- && self . flags == 0
776+ && self . no_flags
777777 }
778778}
779779
You can’t perform that action at this time.
0 commit comments