Closed hsivonen closed 7 years ago
For a workaround, you could add fn_call_style = "block"
in rustfmt.toml.
For a workaround, you could add
fn_call_style = "block"
in rustfmt.toml.
Thank you. This workaround works.
However, the referenced pull request, without the configuration change, didn't fix this.
@hsivonen Thanks for your comment!
As far as I know, block ({...}
) being visually indented is by design. Please take a look at the following example:
fn foo() {
euc_jp_decoder_functions!({
x
},
y,
z);
}
The indent of long code lines inside a block that's passed as a marco argument occasionally becomes a dedent.
Steps to reproduce (using rustfmt 0.8.3):
Actual results:
From line 182 in big5.rs
From line 71 in euc_jp.rs:
Expected results:
Expected the wrapped part of a long line not to start to the left of the start of the line that got wrapped.
To make lines less likely to reach the wrapping limit, expected the indent of blocks passed as macro arguments not to depend on the length of the macro name.