Skip to content

Commit bcb9052

Browse files
committed
Auto merge of rust-lang#107372 - JohnTitor:rollup-zkl2ges, r=JohnTitor
Rollup of 9 pull requests Successful merges: - rust-lang#106806 (Replace format flags u32 by enums and bools.) - rust-lang#107194 (Remove dependency on slice_internals feature in rustc_ast) - rust-lang#107234 (Revisit fix_is_ci_llvm_available logic) - rust-lang#107316 (Update snap from `1.0.1` to `1.1.0`) - rust-lang#107321 (solver comments + remove `TyCtxt::evaluate_goal`) - rust-lang#107332 (Fix wording from `rustbuild` to `bootstrap`) - rust-lang#107347 (reduce rightward-drift) - rust-lang#107352 (compiler: Fix E0587 explanation) - rust-lang#107357 (Fix infinite loop in rustdoc get_all_import_attributes function) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents afb586f + b64a209 commit bcb9052

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

clippy_utils/src/macros.rs

+4-4
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)