From aeb33986b1a5a509bd036e5ee105495b4e894797 Mon Sep 17 00:00:00 2001 From: Seiichi Uchida Date: Sun, 3 Dec 2017 11:37:55 +0900 Subject: [PATCH] Add macros from the log crate to whitelist --- src/expr.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/expr.rs b/src/expr.rs index e82d23b21fde..e3b06b343fea 100644 --- a/src/expr.rs +++ b/src/expr.rs @@ -1796,6 +1796,7 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt } const FORMAT_LIKE_WHITELIST: &[&str] = &[ + // From the Rust Standard Library. "eprint!", "eprintln!", "format!", @@ -1803,6 +1804,12 @@ const FORMAT_LIKE_WHITELIST: &[&str] = &[ "panic!", "println!", "unreachable!", + // From the `log` crate. + "debug!", + "error!", + "info!", + "panic!", + "warn!", ]; const WRITE_LIKE_WHITELIST: &[&str] = &["assert!", "write!", "writeln!"];