Skip to content

Commit 9dcb692

Browse files
committed
Add tool_attributes feature to unstable book
1 parent 5146c0c commit 9dcb692

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# `tool_attributes`
2+
3+
The tracking issue for this feature is: [#44690]
4+
5+
[#44690]: https://github.com/rust-lang/rust/issues/44690
6+
7+
------------------------
8+
9+
Tool attributes let you use scoped attributes to control the behavior
10+
of certain tools.
11+
12+
Currently tool names which can be appear in scoped attributes are restricted to
13+
`clippy` and `rustfmt`.
14+
15+
## An example
16+
17+
```rust
18+
#![feature(tool_attributes)]
19+
20+
#[rustfmt::skip]
21+
fn foo() { println!("hello, world"); }
22+
23+
fn main() {
24+
foo();
25+
}
26+
```

0 commit comments

Comments
 (0)