Missing indentation if using hard_tabs
Open
Nobody has claimed this yet.
I-poor-formatting
only-with-option
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 24
Description
Version: rustfmt 0.99.5-nightly (90692a59 2018-09-26).
In match-blocks only first line is indented. All following lines should indented too but not.

Example to reproduce:
enum Foo { A, B, C }
fn main() {
let extra_indent = |v: Foo| {
(|v| {
match v {
Foo::A => println!("A"),
Foo::B => println!("B"),
Foo::C => println!("C"),
}
},
v)
};
}
I can reproduce only in the any list (tuple/union/array/...).
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
Start by reproducing the formatting discrepancy with the provided Rust example and the linked hard-tabs rustfmt configuration. Trace the match-block formatting path and verify that every line in match arms receives the expected indentation when hard tabs are enabled.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100