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

pr-follow-up-review-pending

# Summary Currently `alloc`, `core`, and `std` imports are always reordered lexicographically (when they will be reordered). However, at least when a reordered group only contains these standard library crates,...

p-low
feature-request
a-imports

I'm seeing this behavior in rustfmt 1.6.0-nightly (c469197b 2023-08-22): ```rust // Before (correct in stable) type AAAAAAAAAAAAA: BBBBBBBBBBBBBBB< CCCCCCCCCCCCCCCCC, DDDDDDDDDDDDDDDDD, EEEEEEEEEEEEEEEEE, FFFFFFFFFFFFFFFFF, GGGGGGGGGGGGGGGGG, HHHHHHHHHHHHHHHHH, IIIIIIIIIIIIIIIII, >; // After (hopefully not...

poor-formatting
only-with-option
a-2024-edition

Tracking issue for unstable option: reorder_impl_items

unstable option

This ports https://github.com/rust-lang/rustfmt/pull/4745 to the current master branch. That led to a bunch of test failures so I hacked around until they were all gone... but the codebase is entirely...

pr-follow-up-review-pending

Fix #5662. Previously, an `enum` item containing an attribute (rustdoc or macro for example) would be considered multi-line, thus forcing the formatting strategy of all the items in the enum...

pr-waiting-on-author

Formatting inside the `lazy_static!` macro did not work when the macro was used with the crate name: `lazy_static::lazy_static!`. For example, that code is formatted well. ``` use lazy_static::lazy_static; ... lazy_static!...

p-low
a-macros

Fix #6277 by filtering list use and renormalize if needed

pr-follow-up-review-pending

Minimum reproducible example: ```rust fn main() { let foo = // 114514 if true { 1919 } else { 810 }; } ``` Note the extra whitespace after `=`. Version:...

a-comments
e-trailing whitespace

fixes #6267 The `ForeignItemKind::Static(_)` match arm in the `ast::ForeignItem` `Rewrite` impl duplicated some of the logic already implemented in `rewrite_static`, so reusing it helps centralize the logic. The other benefit...

pr-not-reviewed