mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-18 18:53:04 +00:00
readme: Clarify the ways of specifying rustfmt_skip
It was previously unclear that the `cfg_attr` version works in stable Rust.
This commit is contained in:
parent
6f2bb908bb
commit
0e0f3c8c61
@ -110,8 +110,8 @@ options covering different styles. File an issue, or even better, submit a PR.
|
||||
* For things you do not want rustfmt to mangle, use one of
|
||||
|
||||
```rust
|
||||
#[rustfmt_skip]
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)]
|
||||
#[rustfmt_skip] // requires nightly and #![feature(custom_attribute)] in crate root
|
||||
#[cfg_attr(rustfmt, rustfmt_skip)] // works in stable
|
||||
```
|
||||
* When you run rustfmt, place a file named rustfmt.toml in target file
|
||||
directory or its parents to override the default settings of rustfmt.
|
||||
|
Loading…
Reference in New Issue
Block a user