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

Not entirely sure on the exact rules for when this happens. So far I've worked out that, at least for the test code below on the tested version of rustfmt...

poor-formatting
p-low
a-macros

**Input** ```rust fn main() { let x = 111; /* First Comment line 1 * First Comment line 2 */ let x = 222; /* Second Comment line 1 *...

poor-formatting
a-comments
p-low

I have code that contains this: ```rust //! If that's what you have and it works, you don't need this crate at all — you //! can just use [`CARGO_BIN_EXE_`][cargo-env]....

a-comments
p-low
feature-request
e-max width

Fixes #4637 .

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

Closes #4210 This is a trivial cherry-pick of https://github.com/rust-lang/rustfmt/pull/4214 onto the new `master` branch.

pr-ready-to-merge

As discussed in #2924 and "hinted" in #2555 and maybe others, a per-type skip would be nice. I don't have tens of use-case, in fact I have only one: the...

feature-request
a-rustfmt::skip

Discussion for `reorder_impl_blocks` configuration option. Implemented by: *TBD*. This option enforces ordering of `impl` blocks such that struct implementations precede trait implementations. ```rust struct MyStruct { ... } impl fmt::Debug...

p-low
feature-request

`cargo fmt -- --config wrap_comments=true` turns this: ```rust /// doc /// /// Table that is > 80 symbols: /// /// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | /// |-------|--------------------------------------------------------------------| /// | val...

bug
only-with-option
1x-backport:pending

Closes #4635 It's unclear which commit resolved this, but the original issue cannot be reproduced.

p-low
pr-not-reviewed