Summary
I tried to format this code: stage0 bump https://github.com/rust-lang/rust/pull/162040/changes#diff-29bf34e005bfe0956e60f3713ab0290027a3c97ce8c2112f818fe4f90b41d82e
pub const POLY_CONST_1<const C: bool>: () = if C { func3() };
Expected behavior
I expected to see this happen: no formatting changes?
Maybe the new formatting is fine, but this should be deliberate and not accidental.
Actual behavior
Instead, this happened: formatting has changed
$ rustfmt +nightly ../reproducer/foo.rs --config-path=/dev/null --style-edition=2024 --edition=2024 --check
Diff in /home/joe/repos/reproducer/foo.rs:1:
-pub const POLY_CONST_1<const C: bool>: () = if C { func3() };
+pub const POLY_CONST_1<const C: bool>: () = if C {
+ func3()
+};
Meta
Version it worked on
It most recently worked on: beta rustfmt 1.10.0-beta (cbae9b4cae 2026-08-28)
Version with regression
Nightly.
rustfmt 1.10.0-nightly (5db7f4be8a 2026-09-01)
I bisected the rust-lang/rust side to the subtree sync rust-lang/rust#161964 (since we recently updated stage0 rustfmt to the commit of that subtree sync). Within that subtree sync, I did manual guessing and bisected to #6956 by reverting the change to see if the formatting difference goes away.
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged
Summary
I tried to format this code: stage0 bump https://github.com/rust-lang/rust/pull/162040/changes#diff-29bf34e005bfe0956e60f3713ab0290027a3c97ce8c2112f818fe4f90b41d82e
Expected behavior
I expected to see this happen: no formatting changes?
Maybe the new formatting is fine, but this should be deliberate and not accidental.
Actual behavior
Instead, this happened: formatting has changed
Meta
Version it worked on
It most recently worked on: beta
rustfmt 1.10.0-beta (cbae9b4cae 2026-08-28)Version with regression
Nightly.
I bisected the rust-lang/rust side to the subtree sync rust-lang/rust#161964 (since we recently updated stage0 rustfmt to the commit of that subtree sync). Within that subtree sync, I did manual guessing and bisected to #6956 by reverting the change to see if the formatting difference goes away.
@rustbot modify labels: +regression-from-stable-to-nightly -regression-untriaged