From 0291331203e741b43eda016f8669f5dcdc807ed3 Mon Sep 17 00:00:00 2001 From: David Wood Date: Sun, 24 Dec 2017 12:27:07 +0000 Subject: [PATCH] Add documentation to expr::SPECIAL_MACRO_WHITELIST --- src/expr.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/expr.rs b/src/expr.rs index 2d4b731a69d7..0c60ba5a201c 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1811,6 +1811,12 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt ) } +/// A list of `format!`-like macros, that take a long format string and a list of arguments to +/// format. +/// +/// Organized as a list of `(&str, usize)` tuples, giving the name of the macro and the number of +/// arguments before the format string (none for `format!("format", ...)`, one for `assert!(result, +/// "format", ...)`, two for `assert_eq!(left, right, "format", ...)`). const SPECIAL_MACRO_WHITELIST: &[(&str, usize)] = &[ // format! like macros // From the Rust Standard Library.