rustfmt
rustfmt copied to clipboard
Format Rust code
I use the newest rustfmt release 1.51 included in the Arch Linux `rust` 1-1.63.0-1 package released on 2022-08-11 but rustfmt does not recognize the `fn_params_layout` option: ```bash $ cargo --version...
Currently blocked on formatting decision: https://github.com/rust-dev-tools/fmt-rfcs/issues/169 Fixes #4955 Fixes #5177
A number of our existing tests (targeting rustfmt on master) have poor formatting of return types that don't align with the changes made in #4368: https://github.com/rust-lang/rustfmt/blob/f817383f9c3c4b5be9fdd77a034ba18dd3bd0da3/tests/target/issue-3278.rs#L1-L2 https://github.com/rust-lang/rustfmt/blob/f817383f9c3c4b5be9fdd77a034ba18dd3bd0da3/tests/target/long-fn-1.rs#L18-L19 https://github.com/rust-lang/rustfmt/blob/f817383f9c3c4b5be9fdd77a034ba18dd3bd0da3/tests/target/issue-2672.rs#L30-L31 https://github.com/rust-lang/rustfmt/blob/f817383f9c3c4b5be9fdd77a034ba18dd3bd0da3/tests/target/issue-2672.rs#L48-L49 I...
The [`single_line_if_else_max_width`](https://github.com/rust-lang/rustfmt/blob/master/Configurations.md#single_line_if_else_max_width) is one of many configuration options that could use some improvements to it's documentation. It would be great to: * Add code snippets to highlight the functionality this...
```rust macro_rules! generate_the_struct { ($a:literal) => { pub struct Struct { #[clap( long = "--alpha-beta-gamma", env = "ALPHA_BETA_GAMMA", default_value = $a, )] alpha_beta_gamma: usize, } }; } ``` The arguments...
When having `wrap_comments = true`, running rustfmt on the following code produces an error: ```rust fn f() { g({ // some trailing spaces on the line below - this needs...
Backport #4524 Fixes #5138 Backport of #4524 that fixes #4471 with enhancements to fix #5138.
Fixes #5193 The issues was related to the interaction between two differnt configuration options when applied to the last match arm. * ``trailing_comma = Never`` * ``match_block_trailing_comma = true`` Previously,...
Fixes #4551 Backport #4658 and suggested fix for #4551. The backport and the suggested fix are submitted in one PR, since fixing #4551 requires both, and if only one will...