We recently landed two PRs which together reformatted essentially all code in the compiler tree.
The first one, #65939, contained the initial formatting infrastructure. We currently use rustfmt directly, pinned to a version specified in src/stage0.txt. We expect to update it as needed, and otherwise once per cycle (coinciding with the bootstrap bump, most likely).
The second one which reformatted the majority of the codebase is #67540.
This change landed with the following rustfmt config. Note that this this configuration is subject to change (in particular, merge_derives may be removed in the future), but should be fairly stable. Your editor should automatically pick this configuration up inside the rust-lang/rust repository (it is located in the rustfmt.toml file in the root).