Format Rust code
rustc-ap-*
crates to rustc_private
for consumption model of rustc internalsannotate-snippets
updated to v0.8 PR #4762
cargo fmt
in large workspaces utilizing the --all
flag by updating to a newer version of cargo_metadata
that leverages updated cargo
output from v1.51+ PR #4997
version = Two
in your configuration to take advantage of the new formatting
match_block_trailing_comma
configuration option #3380 - https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#match_block_trailing_comma
disable_all_formatting
configuration option #5026 - https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#disable_all_formatting
2021
for edition value from rustfmt command line PR #4847
--help
text on stable PR #4798
match_block_trailing_comma
where commas were not added to the blocks of bodies whose arm had a guard that did not fit on the same line as the pattern #4998
struct_field_align_threshold
was enabled #4926
Note this hit the rustup distributions prior to the v1.4.38 release as part of an out-of-cycle updates, but is listed in this version because the feature was not in the other v1.4.37 releases. See also the use_small_heuristics
section on the configuration site for more information
https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#use_small_heuristics
One
variant added to imports_granularity
configuration option which can be used to reformat all imports into a single use statement #4669
@generated
at the top of the file #3958
hex_literal_case
that allows user to control the casing utilized for hex literals PR #4903
See the section on the configuration site for more information https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#hex_literal_case
cargo fmt
now directly supports the --check
flag, which means it's now possible to run cargo fmt --check
instead of the more verbose cargo fmt -- --check
#3888
rustc-ap-*
crates updated to v712.0.0