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

Implements a new configuration option,`indent_blank_lines`, to indent empty lines left between items. Relevant issue: https://github.com/rust-lang/rustfmt/issues/887 Important difference: This makes no attempt to preserve the original (horizontal) whitespace on that line;...

pr-not-reviewed

Most notably this release stabalizes `style_edition=2024` and the `--style-edition` CLI option.

pr-not-reviewed

Resolves https://github.com/rust-lang/rustfmt/issues/6343 Now I try to format paths in derive macro attribute. It is especially visible in for example [sea-orm-cli](https://www.sea-ql.org/SeaORM/docs/generate-entity/sea-orm-cli/) and other crates that generate derive attributes.

pr-not-reviewed

Tracking issue for unstable option: binop_separator

unstable option

Tracking issue for unstable option: `match_arm_indent`. This option was added by https://github.com/rust-lang/rustfmt/pull/6525 and requested in https://github.com/rust-lang/rustfmt/issues/2937 [Option documentation.](https://rust-lang.github.io/rustfmt/#match_arm_indent) See [Processes.md, "Stabilising an Option"](https://github.com/rust-lang/rustfmt/blob/master/Processes.md#stabilising-an-option): - [x] Is the default value correct?...

unstable option

> I encountered a similar bug. > > See https://github.com/xiyuzhai/cargo-fmt-bug-report0. > > Run > > ```bash > cargo fmt > ``` > > Then the compiler will panic like: >...

bug
fixed

Given a snippet like this ```rust unsafe fn foobar() { core::arch::asm!("{}", const X) } ``` I'd expect that to format to ```rust unsafe fn foobar() { core::arch::asm!("{}", const X) }...

feature-request
blocked

Fixes #6517 The underlying issue was an incorrect comparison between a `Cargo.toml` **file path** and the workspace's root **directory path**. Now that we're comparing two directory paths `in_workspace_root` gets set...

pr-not-reviewed

rustfmt 1.8.0-stable 2025-03-15 4eb161250e does not reformat the following input, violating the default `max_width` of 100 characters: ```rust mod tests { // 100 characters is ··································································· here: | fn a_very_long_function_name_such_as_sometimes_found_in_descriptive_test_fn()...

e-max width

Formatting ```rust fn foo(x: //comment here u32) {} ``` results in (on playground `1.8.0-nightly (2025-03-22 b48576b4db)`) ```rust pub fn foo(x: //comment here u32 ) { } ``` I agree this...

bug
a-comments
p-low