]> git.lizzy.rs Git - rust.git/commitdiff
Add tool_attributes feature to unstable book
authorSeiichi Uchida <seuchida@gmail.com>
Tue, 30 Jan 2018 10:29:11 +0000 (19:29 +0900)
committerflip1995 <uwdkn@student.kit.edu>
Wed, 2 May 2018 09:48:11 +0000 (11:48 +0200)
src/doc/unstable-book/src/language-features/tool-attributes.md [new file with mode: 0644]

diff --git a/src/doc/unstable-book/src/language-features/tool-attributes.md b/src/doc/unstable-book/src/language-features/tool-attributes.md
new file mode 100644 (file)
index 0000000..15fc84a
--- /dev/null
@@ -0,0 +1,26 @@
+# `tool_attributes`
+
+The tracking issue for this feature is: [#44690]
+
+[#44690]: https://github.com/rust-lang/rust/issues/44690
+
+------------------------
+
+Tool attributes let you use scoped attributes to control the behavior
+of certain tools.
+
+Currently tool names which can be appear in scoped attributes are restricted to
+`clippy` and `rustfmt`.
+
+## An example
+
+```rust
+#![feature(tool_attributes)]
+
+#[rustfmt::skip]
+fn foo() { println!("hello, world"); }
+
+fn main() {
+    foo();
+}
+```