Flickering line break
Open
Nobody has claimed this yet.
C-bug
E-needs-mcve
I-non-idempotency
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
version: rustfmt 1.7.1-nightly (ba1d7f4a 2024-06-29)
config: rustfmt.toml
Formatting is flickering for looooong chain like this:
from this
let removed = roots.extract_if(|root| { /* long block */ }).count();
to this and back:
let removed =
roots.extract_if(|root| { /* long block */ }).count();
Flickering in this case means following:
- run
rustfmt cargo/src/build/mod.rs=> we've got new line-break- run
rustfmt cargo/src/build/mod.rs=> line-break is gone- repeat...
example as pr-annotation: https://github.com/boozook/playdate/pull/399#discussion_r1676418639
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the flicker with rustfmt 1.7.1-nightly using rustfmt.toml and cargo/src/build/mod.rs, repeating the documented rustfmt command. Compare the output with the examples and the PR annotation at discussion_r1676418639; done means repeated formatting produces the same line break.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100