Skip to content

Commit

Permalink
Rollup merge of #113140 - joshtriplett:style-guide-example-multi-line…
Browse files Browse the repository at this point in the history
…-attribute, r=calebcartwright

style-guide: Add an example of formatting a multi-line attribute

We already say to format attributes like functions, but we didn't have
an example of formatting a multi-line attribute.
  • Loading branch information
matthiaskrgr authored Jun 29, 2023
2 parents c4dc70e + 4cc8065 commit c0e37ad
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 c0e37ad

Please sign in to comment.