rustfmt
rustfmt copied to clipboard
Format Rust code
Do not add trailing space to empty lines in comment code blocks (#4304) Currently, the first line pushed in a code block is a comment line delimiter that includes a...
Back ported #3857 and #4550 Closes #5017 Closes #4515
Fixes #4959 During module resolution rustfmt already peeks inside external sub modules. This process was extended to now capture inner attributes from those sub modules and relate them back to...
Fixes #5244 When `wrap_comments=true` was set there was a chance that the line right before the comment would be wrapped. When this happened, rustfmt didn't place a newline between the...
When formatting text via stdin rustfmt didn't have a way to ignore stdin input. Now, when passing input to rustfmt via stdin one can also provide the `--stdin-file-hint` option to...
e.g. to execute all files containing 5250 TEST_FILE=5250 cargo test system
This new option allows rustfmt to convert explicit `self: Self` types in method definitions to `self`: * `self: Self` -> `self` * `self: &Self` -> `&self` * `self: &'a Self`...
Fixes #5249 Previously, we always formatted generic arguments horizontally. Now, we attempt to format generic items horizontally, but when doing so would lead to issue like exceeding the `max_width` we...