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
trafficstars

Fixes #3255 , Fixes #3994 , Closing #4715

p-low
pr-not-reviewed
pr-targeting-2.0

Suggested fix for issue #4273. The main change is in `add_misformatted_file()` to use the proper newline styles in each of the `original/expected` fields in each `MismatchedBlock`. The original code's newline...

p-low
pr-not-reviewed
pr-targeting-2.0

Fixes #4643 .

p-low
pr-targeting-2.0

Suggest fix for issue #4499 - `skip` attribute in `struct impl` and in other cases. The changes are basically to all calls to `push_skipped_with_span()` where the 2nd parameter was `x.span`....

p-low
pr-follow-up-review-pending
pr-targeting-2.0

Add handling of comments between Trait Generics and Bounds by using rewrite_assign_rhs_with_comments() (one of the cases identified in #4626 discussion). Also added workaround for an issue that a comment before...

p-low
pr-targeting-2.0

Fixes #4654 The trailing comma being inserted no longer causes a subsequent comment to be moved up. This change does not affect the [`trailing_comma`] configuration. [`trailing_comma`]: https://rust-lang.github.io/rustfmt/?version=master&search=#trailing_comma ----- This change...

p-low
pr-waiting-on-author
pr-targeting-2.0
pr-merge-conflict

Fixes #4027 .

p-low
pr-waiting-on-author
pr-targeting-2.0

Code blocks in a `//!` doc comment don't seem to be formatted. ```rust mod foo { //! ``` //! horribly .formatted(code //! ); //! ``` } ``` This is on...

a-comments
only-with-option
p-low

Examples: ```rust enum Enum{ Variant { field /*comment*/ : i32} } struct S { field /* comment */ : i32 } ``` Both comments get removed without any warning. Since...

bug
a-comments
p-medium

```rust fn host_perf_check() -> Result { #[cfg(not(build_type = "release"))] return Err(PerfCheckError::WrongBuildType.into()) #[allow(unreachable_code)] #[cfg(not(feature = "hostperfcheck"))] return Err(PerfCheckError::FeatureNotEnabled { feature: "hostperfcheck" }.into()) #[cfg(all(build_type = "release", feature = "hostperfcheck"))] { crate::host_perf_check::host_perf_check()?; Ok(())...

only-with-option
p-low
needs-mcve