`tool_attributes` are stable since 1.30. The old `cfg_attr(rustfmt, rustfmt_skip)` attributes aren't necessary anymore and everyone should switch to `#[rustfmt::skip]` sooner or later.
There is also a Clippy lint in the making for this: rust-lang-nursery/rust-clippy#3123
From now on, the `Cargo.toml` is taken into account when triggering
formatting using `cargo fmt`.
It is considered editor's duty to pass the proper `--edition` argument
for `rustfmt` if it is being called manually.
Refs: #3104.
Refs: #3129.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
In #2725 the Travis CI config snippet was changed to use nightly
Rust because the stable rustfmt of the time (rustfmt 0.4.1-stable)
did not contain the `--check` flag, which is used in the Travis
config snippet. The current stable rustfmt (rustfmt 0.8.2-stable)
does contain the `--check` flag, so it is now possible to use the
Travis config in the README with stable rustfmt.
The current stable rustfmt (rustfmt 0.4.1-stable) does not contain
the `--check` flag, which is used in the Travis config snippet.
Once a new stable version is released, the snippet can be switched
back to stable Rust.
* Add rough draft of `check` mode. Not unit tested.
* Added assert-cli; simple test case for `--write-mode=check`
* Lightly documented `check` WriteMode
* wrote clearer phrasing for config::options::WriteMode::Check
* Implemented default for WriteMode where default is Overwrite
* Simplified exit code handling
* updated README.md as per @nrc' comment
* collapsed exit-code handling
* Removed write_mode from Summary, introduced partial option parsing earlier
* Handle write-mode parsing in a slightly better way.
when using stable cargo install fails due to #![feature] usage:
error[E0554]: #![feature] may not be used on the stable release channel
--> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:24:1
|
24 | #![feature(rustc_private, box_syntax)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: #![feature] may not be used on the stable release channel
--> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:25:1
|
25 | #![feature(core_intrinsics)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: #![feature] may not be used on the stable release channel
--> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:26:1
|
26 | #![feature(i128_type)]
| ^^^^^^^^^^^^^^^^^^^^^^
error[E0554]: #![feature] may not be used on the stable release channel
--> /Users/dnw/.cargo/registry/src/github.com-1ecc6299db9ec823/rustc-ap-serialize-67.0.0/lib.rs:27:1
|
27 | #![feature(specialization)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to 4 previous errors
error: Could not compile `rustc-ap-serialize`.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `rustfmt-nightly v0.4.1 (file:///d/rustfmt)`, intermediate artifacts can be found at `/d/rustfmt/target`