Skip to content

Commit

Permalink
Remove deprecated cfg_attr from README
Browse files Browse the repository at this point in the history
`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/rust-clippy#3123
  • Loading branch information
flip1995 authored Oct 29, 2018
1 parent 1f64f40 commit 9adf96d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,7 @@ See [Configurations.md](Configurations.md) for details.

## Tips

* For things you do not want rustfmt to mangle, use one of

```rust
#[rustfmt::skip] // requires nightly Rust and #![feature(tool_attributes)] in crate root
#[cfg_attr(rustfmt, rustfmt_skip)] // works in stable
```
* For things you do not want rustfmt to mangle, use `#[rustfmt::skip]`
* When you run rustfmt, place a file named `rustfmt.toml` or `.rustfmt.toml` in
target file directory or its parents to override the default settings of
rustfmt. You can generate a file containing the default configuration with
Expand Down

0 comments on commit 9adf96d

Please sign in to comment.