Skip to content

Commit

Permalink
Rollup merge of rust-lang#114919 - joshtriplett:style-guide-macros, r…
Browse files Browse the repository at this point in the history
…=calebcartwright

style-guide: Add guidance for defining formatting for specific macros
  • Loading branch information
GuillaumeGomez authored Aug 27, 2023
2 parents 8550f15 + 69f38f6 commit 9d64b0a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/doc/style-guide/src/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,12 @@ constructs. For example, a macro use `foo!(a, b, c)` can be parsed like a
function call (ignoring the `!`), so format it using the rules for function
calls.

### Special case macros
The style guide defines specific formatting for particular macros in the
language or standard library. The style guide does not define formatting for
any third-party macros, even if similar to those in the language or standard
library.

### Format string macros

For macros which take a format string, if all other arguments are *small*,
format the arguments before the format string on a single line if they fit, and
Expand Down

0 comments on commit 9d64b0a

Please sign in to comment.