From 69f38f6fdaf0cafbffc0223ec42b1e8925100444 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Wed, 16 Aug 2023 19:52:44 -0700 Subject: [PATCH] style-guide: Add guidance for defining formatting for specific macros --- src/doc/style-guide/src/expressions.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/doc/style-guide/src/expressions.md b/src/doc/style-guide/src/expressions.md index 32c604f9f3e..e9ef509e6a2 100644 --- a/src/doc/style-guide/src/expressions.md +++ b/src/doc/style-guide/src/expressions.md @@ -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