rustfmt
rustfmt copied to clipboard
Format Rust code
Fixes #5234 This will also change ``` ''' ''' ``` to ``` ''' ''' ``` where `'''` represents backticks
Add support for formatting ``asm!`` macro calls. Formatting for ``asm!``is gated behind a new unstable ``foramt_asm_macro`` configuration value. Tracking issue for the new configuration value can be found at #5210...
Fixes #5073 Normally we would want to remove any empty trailing doc comments however, as highlighted by 5073 by removing these trailing comments rustfmt is interfering with tools like rustdoc....
This adds a new `type_separator` option, similar to the `binop_separator` option, as requested in #4979. Tests for it are included in `tests/{source,target}/type-separator-back/`. While trying to come up with appropriate tests...
Suggested fix for issue #4793 for handling empty code block in doc comments (replacing PR #4895). If the doc comments code block includes only empty lines than the output is...
This PR solves #4012; any suggestion is appreciated!
Back-port the fix (#4720) to rustfmt 1.x; In order to version-gate in `LineClasses`, several function signature had been changed: * `wrap_str` * `filter_normal_code` Should we add the idempotent test cases...
Ref #4968. Tabs were always counted to have a width of config.tab_spaces. Since they actually can have less than that depending on the line's previous contents, rustfmt would sometimes complain...
Fixes #4844 When using `control_brace_style = 'AlwaysNextLine'` and `match_arm_blocks = false`, rustfmt would add extra whitespace if the match body didn't fit on one line. This adds a check for...