rustfmt
rustfmt copied to clipboard
Format Rust code
Closes #5218 The `fn_call_layout` was added to give users more control over how function calls are formatted. The values are identical to those for `fn_args_layout`, which is a stable option...
If I have a struct type with an implicit field such as ``` struct MyStruct(u64); ``` And I attempt to initialize it to 0 ``` let instance = MyStruct {...
Input: ```rust use c; // use c; use b; // use b; use a; // use a; ``` Expected: ```rust use a; // use a; use b; // use b;...
``` nazar-pc@nazar-pc:/w/s/subspace> rustfmt --version rustfmt 1.5.1-nightly (62b272d 2022-07-21) nazar-pc@nazar-pc:/w/s/subspace> rustfmt --config error_on_line_overflow=true crates/pallet-subspace/src/lib.rs error[internal]: line formatted, but exceeded maximum width (maximum: 100 (see `max_width` option), found: 105) --> /web/subspace/subspace/crates/pallet-subspace/src/lib.rs:478:478:101 |...
this is very weird, if my config file is at `/Users/lara/Library/Preferences/rustfmt/rustfmt.toml` the options are detected (`cargo fmt` complains it can't set the options on stable), but they don't do anything.....
From the disscussion in https://github.com/rust-lang/rustfmt/issues/4091, `rustfmt` should support format Cargo.toml since the [Style Guide actually already includes a spec for Cargo.toml](https://github.com/rust-dev-tools/fmt-rfcs/blob/master/guide/cargo.md?rgh-link-date=2020-04-11T05%3A30%3A22Z). And things to consider include: - formatting logic -...
Tracking issue for unstable option: `skip_macro_invocations`. * [ ] [Option documentation.](https://rust-lang.github.io/rustfmt/#skip_macro_names) From discussion here: https://github.com/rust-lang/rustfmt/issues/5324#issuecomment-1111797851 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? * [x] The...
This new action is intended to help us maintainers determine when feature branches cause breaking formatting changes by running rustfmt (master) and the feature branch on various rust repositories. Over...