Skip to content

Commit 0291331

Browse files
committed
Add documentation to expr::SPECIAL_MACRO_WHITELIST
1 parent 3320b40 commit 0291331

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/expr.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1811,6 +1811,12 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt
18111811
)
18121812
}
18131813

1814+
/// A list of `format!`-like macros, that take a long format string and a list of arguments to
1815+
/// format.
1816+
///
1817+
/// Organized as a list of `(&str, usize)` tuples, giving the name of the macro and the number of
1818+
/// arguments before the format string (none for `format!("format", ...)`, one for `assert!(result,
1819+
/// "format", ...)`, two for `assert_eq!(left, right, "format", ...)`).
18141820
const SPECIAL_MACRO_WHITELIST: &[(&str, usize)] = &[
18151821
// format! like macros
18161822
// From the Rust Standard Library.

0 commit comments

Comments
 (0)