Commit graph

4 commits

Author SHA1 Message Date
Stiopa Koltsov
5e71d185bb imports_granularity=Item
Summary: [Post about this change](https://fb.workplace.com/groups/rust.language/posts/8804682282913642)

Reviewed By: zertosh

Differential Revision: D37459034

fbshipit-source-id: d9b29a4ac5749aaf48322a148ba317f052fe7c6e
2022-07-01 16:24:42 -07:00
David Tolnay
ce519e0af4 Update to version 1.4.38-nightly from nightly-2022-03-28
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
2022-03-29 20:18:21 -07:00
David Tolnay
b351f26d3d Switch configuration to 2021 edition
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
2022-03-29 18:29:47 -07:00
facebook-github-bot
15d2f61411 Initial commit
fbshipit-source-id: c440d991296c92bdc5e109a11d269049e8840e94
2021-12-29 16:14:27 -08:00