-
Notifications
You must be signed in to change notification settings - Fork 898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing indentation if using hard_tabs #3151
Comments
Another example. Current rustfmt result (with same config) : fn main() {
let extra_indent = |v: Foo| {
(|v| {
match v {
Foo::A => {
println!("A");
},
Foo::B => {
println!("B");
},
Foo::C => println!("C"),
}
},
v)
};
} Expected result: fn main() {
let extra_indent = |v: Foo| {
(|v| {
match v {
Foo::A => {
println!("A");
},
Foo::B => {
println!("B");
},
Foo::C => println!("C"),
}
},
v)
};
} |
This comment has been minimized.
This comment has been minimized.
Confirming I can reproduce the main issue where only the first match arm is indented with run input 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,
)
};
} output 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)
};
} |
Linking the tracking issues for |
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:
Example rustfmt config
I can reproduce only in the any list (tuple/union/array/...).
The text was updated successfully, but these errors were encountered: