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

Tracking issue for unstable option: blank_lines_upper_bound

unstable option

**Describe the bug** rustfmt fails to format long strings in variable declarations. **To Reproduce** 1) Go to the playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=934f95c1ee7c244bd171e2f8b211fb54 2) From Tools section run rustfmt 3) See that...

help wanted
1x-backport:pending

Hello, `rustfmt` will remove `::` from a macro. To illustrate: ```Rust construct_runtime!( pub struct Runtime where Block = Block, NodeBlock = generic::Block, UncheckedExtrinsic = UncheckedExtrinsic, { Council: pallet_collective::, TechnicalCommittee: pallet_collective::,...

bug
a-macros

If there is a method call chain, and just one call exceeds max_width, it seems like rustfmt gives up and doesn't format anything. Example: ```rust fn f() { foo("This text...

a-chains
a-strings

Tracking issue for unstable option: `format_code_in_doc_comments`

unstable option

Tracking issue for unstable option: format_macro_matchers

unstable option

It is generally expected that CLI programs on unix-like systems should have a man page. Elsewhere in the Rust toolchain, we do have `rustc.1`, `rustdoc.1`, `cargo.1`, and many `cargo-*.1` subcommands....

p-low
help wanted

this code: ```rust mod phase { pub trait Phase { const RUN: &'static str; const FAIL: &'static str; fn to_style(&self, template: &str); } pub struct Updating {} impl Phase for...

e-trailing whitespace

Closes #5488 Fix for #5488. Before applying shorthand initialization for structs, check if identifier is a literal (e.g. tuple struct). If yes, then do not apply short hand initialization. Added...

pr-ready-to-merge

## Environment * **Rust toolchain version:** 1.64.0-nightly (d5e7f4782 2022-07-16) x86_64-apple-darwin * **Operating system:** macOS 12.5.1 * **Rustfmt version:** rustfmt 1.5.1-nightly (d5e7f478 2022-07-16) ## Problem description The original issue in IntelliJ...

bug
emitter