rustfmt
rustfmt copied to clipboard
Format Rust code
The big rustc format made some code I care about much less readable. Here's an example: ```diff - ref mut local @ LocalValue::Live(Operand::Immediate(_)) | - ref mut local @ LocalValue::Uninitialized...
I'm using [rust_cmd_lib](https://github.com/rust-shell-script/rust_cmd_lib) to do some command execution, and on this simple command: ``` let id = run_fun!(id -u).context(h!())?; ``` rustfmt formats it to: ``` let id = run_fun!(id -...
```rust macro_rules! example { (good) => { macro_rules! good { () => { A }; } }; (bad) => { macro_rules! bad { () => { A
Hello community. This is my first PR, so please bear with me if I do something wrong. I will happily adjust the PR if needed. I have tried to build...
Start with this: ```rust fn a() { a!(b { c: d, // .. }); } ``` Rust rustfmt, and you get this: ```rust fn a() { a!(b { c: d,...
tracked by #6206 ## Description update `rewrite_assignment` to return `RewriteResult`
tracked by #6206 ## Description - impl `rewrite_result` for `Stmt`, `ControlFlow` `OverflowableItem`, `Lifetime` There are still `unknown_error()`s due to calling `format_expr`, but they will be removed after updating `format_expr` in...
## Context Hi, I'm the author of the crate [`bon`](https://github.com/elastio/bon). It exposes a proc macro that generates a builder for a function. Every function parameter can be configured with additional...
The `version-sort` algorithm is described in the [sorting section of the style guide] and the tracking issue for this in the `r-l/rust` repo is https://github.com/rust-lang/rust/issues/123800. [sorting section of the style...
## Pull Request Template ### Checklist - [x] Confirmed that `cargo test` passes ### Related Issues/PRs https://github.com/rust-lang/rustfmt/issues/5892 ### Changes The type alias formatting uses overlapping code path as trait formatting....