Add whitelists of macros that need special-case format

This commit is contained in:
topecongiro 2017-12-01 13:28:36 +09:00 committed by Seiichi Uchida
parent 72cac8beae
commit ffbe52eb76

View File

@ -1807,6 +1807,18 @@ fn rewrite_string_lit(context: &RewriteContext, span: Span, shape: Shape) -> Opt
)
}
const FORMAT_LIKE_WHITELIST: &[&str] = &[
"eprint!",
"eprintln!",
"format!",
"format_args!",
"panic!",
"println!",
"unreachable!",
];
const WRITE_LIKE_WHITELIST: &[&str] = &["assert!", "write!", "writeln!"];
pub fn rewrite_call(
context: &RewriteContext,
callee: &str,