rustfmt icon indicating copy to clipboard operation
rustfmt copied to clipboard

Format Rust code

Results 485 rustfmt issues
Sort by recently updated
recently updated
newest added

Closes #4824 The suggested fix is in two code changes done for Version Two - by adding `trim_start()` before passing a comments string to `rewrite_comment()`. A more robust fix may...

pr-follow-up-review-pending

Closes #5489 Suggested fix for #5489 - allow macro `metavariable` as attribute value. In addition, allow also `CONST` as attribute value. The suggested fix is actually a workaround to a...

pr-not-reviewed

Closes #5496. I am afraid I do not have much experience with ASTs and rustfmt in general, but I have tried to understand the implications of the `single_line_if_else_max_width` config option...

pr-ready-to-merge

Here's a sample code: ``` TraceLayer::new_for_http() .make_span_with(|request: &Request| { tracing::info_span!( "request", method = %request.method(), uri = %request.uri(), status = tracing::field::Empty, latency = tracing::field::Empty, ) }) ``` this uses a macro...

p-low
a-macros

Tracking issue for unstable option: enum_discrim_align_threshold

unstable option

Closes #5471 Test that configs are loaded in the following order: 1. Load configs from the `--config-path` option 2. Travers the directory hierarchy looking for a config file 3. Check...

pr-not-reviewed

When the body of a struct is empty or it only contains comments, the opening brace of the struct body is placed on the same line as the where clause....

poor-formatting

Closes #5463 The `annotate_snippets` crate adds line number and column info to the output, so we don't need to append the line number to the `origin` we pass to `annotate_snippets::snippet::Snippet`....

pr-not-reviewed

Backport of suggested R2 changes for handling indentation of comments between assignment rhs and lhs, taken from different R2 PRs/commits. Not all changes were merged into R2, so this is...

pr-not-reviewed

A user reported `rustfmt` hanging at https://github.com/dtolnay/cargo-expand/issues/161. Here's a semi-reduced example: ```rust fn foo() { { { { pub fn file (state : :: std :: boxed :: Box <...