Skip to content

Commit

Permalink
style-guide: Add guidance for defining formatting for specific macros
Browse files Browse the repository at this point in the history
  • Loading branch information
joshtriplett committed Aug 17, 2023
1 parent 07438b0 commit 69f38f6
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 69f38f6

Please sign in to comment.