Skip to content

Commit

Permalink
style-guide: Add an example of formatting a multi-line attribute
Browse files Browse the repository at this point in the history
We already say to format attributes like functions, but we didn't have
an example of formatting a multi-line attribute.
  • Loading branch information
joshtriplett committed Jun 28, 2023
1 parent eb76764 commit 4cc8065
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doc/style-guide/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ For attributes with argument lists, format like functions.
```rust
#[repr(C)]
#[foo(foo, bar)]
#[long_multi_line_attribute(
split,
across,
lines,
)]
struct CRepr {
#![repr(C)]
x: f32,
Expand Down

0 comments on commit 4cc8065

Please sign in to comment.