Skip to content

Commit 9bd63da

Browse files
authored
Merge pull request #1021 from phansch/more_attribute_examples
Add more attribute examples
2 parents 6f3a040 + 2493394 commit 9bd63da

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)