mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 07:22:42 +00:00
Rollup merge of #114919 - joshtriplett:style-guide-macros, r=calebcartwright
style-guide: Add guidance for defining formatting for specific macros
This commit is contained in:
commit
81408561e0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user