Skip to content

Commit 2493394

Browse files
committed
Add more attribute examples
1 parent 6f3a040 commit 2493394

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/attribute.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ Attributes can take arguments with different syntaxes:
2323
* `#[attribute(key = "value")]`
2424
* `#[attribute(value)]`
2525

26+
Attributes can have multiple values and can be separated over multiple lines, too:
27+
28+
```rust,ignore
29+
#[attribute(value, value2)]
30+
31+
32+
#[attribute(value, value2, value3,
33+
value4, value5)]
34+
```
35+
2636
[cfg]: attribute/cfg.html
2737
[crate]: attribute/crate.html
2838
[lint]: https://en.wikipedia.org/wiki/Lint_%28software%29

0 commit comments

Comments
 (0)