rust-lang / rust-lang/rustfmt

Check `filtered_str_fit` for tab handling

Open
#7,121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-whitespace C-bug SO-hard_tabs
Dominant language
Rust
Stars
7k
Forks
1.1k
Avg merge
2d 13h
Merged PRs (30d)
24

Description

Follow-up to https://github.com/rust-lang/rustfmt/pull/6883, which addresses the last_line_width helper. I think filtered_str_fit is also not aware of tabs vs spaces 🤔

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review pull request #6883 first, then locate the filtered_str_fit entry point in rustfmt and compare its handling of tabs and spaces with the last_line_width change. Done means the function accounts for tab width correctly and the relevant behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.