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

REPRO: ``` $ cat fmt-comment-trouble.rs const RLIB_CRATE_TYPES: [&str; 2] = [ // https://doc.rust-lang.org/nightly/reference/linkage.html#r-link.lib // says: // // > The purpose of this generic lib option is to generate // >...

duplicate
a-comments

Rustfmt adds a comma to the following and causes a compiler error. ```rust macro_rules! idx { ($(#[$attr:meta])* $vis:vis struct $name:ident; $metadata:ident) => { $(#[$attr])* $vis struct $name(usize); }; } idx!(...

bug
a-macros

Tracking issue for unstable option: force_multiline_blocks

unstable option

I think I fixed it and I think it works now! I even found a mistaken issue file where it didn't align even though it should have. This should be...

pr-not-reviewed

Implements new feature that removes nested blocks #5616. The feature is similar to `remove_nested_parens`. Blocks with any sort of comments or attributes, `unsafe` and `const` blocks will not be removed....

pr-not-reviewed

**Describe the bug** The `--config-path` help description says: ``` --config-path [Path for the configuration file] Recursively searches the given path for the rustfmt.toml config file. If not found reverts to...

bug

Rust allows placing comments inside macro names between the macro identifier and the exclamation/bang ([playground link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=f75f9f2f116b414f8a874eb19db90c08)) This comment is gobbled by rustfmt: ```console $ cat x.rs fn main() { println/*test*/!("hi");...

a-comments
p-low
a-macros

For [Tock](https://github.com/tock/tock), we run rustfmt with Travis CI, and some PRs ([example1](https://github.com/tock/tock/pull/1723) and [example2](https://github.com/tock/tock/pull/1754)) are passing a rustfmt check while still using tabs for indentation. - No config options (we...

bug
poor-formatting
a-comments
a-matches

Having an old configuration file, I would like the ability to add any new, missing configuration values after upgrading rustfmt - probably at the end -, to be reviewed and...

p-low
feature-request

I think the comparing algorithm in https://github.com/rust-lang/rustfmt/blob/master/src/sort.rs is a very useful, is it possible to release it as a standalone crate so that it can be reused by other projects?

p-low
feature-request