summary refs log tree commit diff
path: root/rustfmt.toml
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2024-12-17 14:33:10 -0800
committerJosh Triplett <josh@joshtriplett.org>2024-12-17 14:33:10 -0800
commita105cd606628b07e79ab343cc183a176e278c809 (patch)
tree051f572eb6a1fcf3cb4541d4c427e0c13d02a8bd /rustfmt.toml
parenta4cb3c831823d9baa56c3d90514b75b2660116fa (diff)
downloadrust-a105cd606628b07e79ab343cc183a176e278c809.tar.gz
rust-a105cd606628b07e79ab343cc183a176e278c809.zip
Use field init shorthand where possible
Field init shorthand allows writing initializers like `tcx: tcx` as
`tcx`. The compiler already uses it extensively. Fix the last few places
where it isn't yet used.
Diffstat (limited to 'rustfmt.toml')
-rw-r--r--rustfmt.toml1
1 files changed, 1 insertions, 0 deletions
diff --git a/rustfmt.toml b/rustfmt.toml
index 16a0d67ab52..8feeb60ca12 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -4,6 +4,7 @@ use_small_heuristics = "Max"
 merge_derives = false
 group_imports = "StdExternalCrate"
 imports_granularity = "Module"
+use_field_init_shorthand = true
 
 # Files to ignore. Each entry uses gitignore syntax, but `!` prefixes aren't allowed.
 ignore = [