Do not set inside_macro flag when converting try!() to '?'

This will keep rustfmt idempotent when using 'use_try_shorthand' config option.
This commit is contained in:
Seiichi Uchida 2017-12-10 21:53:01 +09:00
parent 42726906f7
commit 90383d7426

View File

@ -118,6 +118,7 @@ pub fn rewrite_macro(
context.inside_macro = true;
if context.config.use_try_shorthand() {
if let Some(expr) = convert_try_mac(mac, context) {
context.inside_macro = false;
return expr.rewrite(context, shape);
}
}