Summary:
The changes from the old "rustfmt 2.x" branch, which we upgraded to in D23569308, have since been merged into the master branch of rustfmt under the flag `version = "Two"`. Fixes like needed for https://fb.workplace.com/groups/learningrust/posts/545143730235002 now only land to master; there is no separate 2.x branch in development. This diff pulls in the newest version of rustfmt so that we can handle any new syntax and pick up fixes to rustfmt issues that we report or contribute.
The tools/third-party/rustfmt changes in this diff are generated by:
```
$ echo nightly-2022-03-28 > tools/third-party/rustfmt/.rustfmt-version
$ tools/third-party/rustfmt/rustfmt-upgrade
```
Reviewed By: zertosh
Differential Revision: D35234535
fbshipit-source-id: c79454fa918cf052312418dd271404e85bf872b2
Summary:
This results in no formatting changes for the Rust code that's in fbcode today, but it does affect the configuration of the Rust parser that `rustfmt` parses its input with.
There are some language changes between 2018 edition and 2021 edition: for example the macro input in `m!(s"")` is 2 tokens in 2018 edition and 1 token in 2021 edition. Thus even absent any formatting differences, it's possible that different error messages would be produced on a particular input by `rustfmt --edition 2018` vs `rustfmt --edition 2021`, so it's best for us to keep the rustfmt edition in sync with the edition that Buck runs rustc with, which is:
https://www.internalfb.com/code/fbsource/[b25775c8103c84ae602d9bcf297595b56f932f5a]/tools/buckconfigs/fbsource-common.bcfg?lines=324-325
Reviewed By: zertosh
Differential Revision: D35234518
fbshipit-source-id: c1b9ab47f4e592b7fd1530d39af878775cf1dc18