Rollup merge of #67701 - petrochenkov:tidybless, r=Mark-Simulacrum

tidy: Enforce formatting rather than just check it if `--bless` is specified

Ensuring the "tidy"-ness currently requires running `rustfmt` twice:
```sh
./x.py fmt && ./x.py test tidy
```
, once to actually format code and the second time as a part of tidy to check that the code is formatted.

Running `rustfmt` is slow, so we don't want to run it twice.

With this PR tidy enforces the formatting rather than just checks it if `--bless` was passed to it:
```sh
./x.py test tidy --bless
```

r? @Mark-Simulacrum
This commit is contained in:
Yuki Okushi 2019-12-30 14:07:56 +09:00 committed by GitHub
commit b6244af566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -736,7 +736,7 @@ impl Step for Tidy {
if builder.config.channel == "dev" || builder.config.channel == "nightly" {
builder.info("fmt check");
crate::format::format(&builder.build, true);
crate::format::format(&builder.build, !builder.config.cmd.bless());
}
}