]> git.lizzy.rs Git - rust.git/commitdiff
readme: Clarify the ways of specifying rustfmt_skip
authorKamal Marhubi <kamal@marhubi.com>
Thu, 17 Mar 2016 04:51:16 +0000 (00:51 -0400)
committerKamal Marhubi <kamal@marhubi.com>
Thu, 17 Mar 2016 04:51:16 +0000 (00:51 -0400)
It was previously unclear that the `cfg_attr` version works in stable
Rust.

README.md

index bf6585a8576e46f9bcd76d027e62066de05158f2..fbe605fb43073e19f50ce7ae27dbfefe4daed14a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -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.