fix for #355 and test cases
This commit is contained in:
parent
e176dc97fe
commit
f1dfab5a29
3 changed files with 113 additions and 1 deletions
|
@ -151,7 +151,11 @@ impl Rewrite for ast::Expr {
|
|||
rewrite_chain(self, context, width, offset)
|
||||
}
|
||||
ast::Expr_::ExprMac(ref mac) => {
|
||||
rewrite_macro(mac, context, width, offset)
|
||||
// Failure to rewrite a marco should not imply failure to rewrite the Expr
|
||||
rewrite_macro(mac, context, width, offset).or(wrap_str(context.snippet(self.span),
|
||||
context.config.max_width,
|
||||
width,
|
||||
offset))
|
||||
}
|
||||
// We do not format these expressions yet, but they should still
|
||||
// satisfy our width restrictions.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue