rustfmt
rustfmt copied to clipboard
Format Rust code
Tracking issue for unstable option: blank_lines_upper_bound
**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...
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::,...
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...
Tracking issue for unstable option: `format_code_in_doc_comments`
Tracking issue for unstable option: format_macro_matchers
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....
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...
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...
## 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...