rustfmt
rustfmt copied to clipboard
Format Rust code
Not entirely sure on the exact rules for when this happens. So far I've worked out that, at least for the test code below on the tested version of rustfmt...
**Input** ```rust fn main() { let x = 111; /* First Comment line 1 * First Comment line 2 */ let x = 222; /* Second Comment line 1 *...
I have code that contains this: ```rust //! If that's what you have and it works, you don't need this crate at all — you //! can just use [`CARGO_BIN_EXE_`][cargo-env]....
Fixes #4637 .
```rust pub fn foo
Closes #4210 This is a trivial cherry-pick of https://github.com/rust-lang/rustfmt/pull/4214 onto the new `master` branch.
As discussed in #2924 and "hinted" in #2555 and maybe others, a per-type skip would be nice. I don't have tens of use-case, in fact I have only one: the...
Discussion for `reorder_impl_blocks` configuration option. Implemented by: *TBD*. This option enforces ordering of `impl` blocks such that struct implementations precede trait implementations. ```rust struct MyStruct { ... } impl fmt::Debug...
`cargo fmt -- --config wrap_comments=true` turns this: ```rust /// doc /// /// Table that is > 80 symbols: /// /// | table | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | /// |-------|--------------------------------------------------------------------| /// | val...
Closes #4635 It's unclear which commit resolved this, but the original issue cannot be reproduced.