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 #5939

pr-follow-up-review-pending

```rust fn main() { println!("{}", builtin # offset_of(A, 0. 1.1.1)); } ``` ``` thread 'main' panicked at src/tools/rustfmt/src/expr.rs:407:13: internal error: entered unreachable code stack backtrace: 0: 0x7f5d061634ec - std::backtrace_rs::backtrace::libunwind::trace::h735859f22ae1ae42 at...

bug
p-low
a-macros

This: ```rust fn main() { let (/**/ () /**/ | /**/ () /**/) = (); } ``` gets turned into this: ```rust fn main() { let (() | ()) =...

bug
a-comments

Self-explanatory. cc rust-lang/rust#114901 This implementation is probably super busted. I have no idea what most of these options in rustfmt mean, lol.

pr-ready-to-merge
release-notes

```rust trait Trait { fn foo(&self) -> u32 { 0 } } struct F; impl Trait for S { reuse to_reuse::foo { self } reuse ::foo; } ``` `rustfmt 1.7.0-nightly...

bug

this addresses a panic when `rustfmt --check` makes a `write()` call that fails. There have been a few issues that already discussed this: https://github.com/rust-lang/rustfmt/issues/5114 https://github.com/rust-lang/rustfmt/issues/2926 On one of the issues...

pr-waiting-on-author

## Background RFC "Style Evolution" (https://github.com/rust-lang/rfcs/pull/3338). Upstream tracking issue: https://github.com/rust-lang/rust/issues/105336 ## Requirements For The New `style_edition` config After reading through the RFC these are the key requirements I found: *...

p-high
feature-request

I wondered why suddenly only half of my file got formatted and boiled down the code to the following MWE: ```rust fn main() { match e { // this line...

a-comments
a-matches

Test: ```shell > echo "m!(const N: usize = 0;);" | rustup run beta rustfmt m!( const N: usize = 0; ); > echo "m!(const N: usize = 0;);" | rustup...

bug
a-macros

The following snippet is formatted using rustfmt. ```rust match Some(1) { Some(number) => ( "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", number, ) .to_owned(), None => ("test", 0).to_owned(), }; ``` In my opinion, this is not...

duplicate