Apply closure exception to match in args
This commit is contained in:
parent
35150ed7ad
commit
0248e9869d
@ -1696,7 +1696,8 @@ fn rewrite_call_inner<R>(context: &RewriteContext,
|
||||
// we format the function arguments horizontally.
|
||||
let overflow_last = match args.last().map(|x| &x.node) {
|
||||
Some(&ast::ExprKind::Closure(..)) |
|
||||
Some(&ast::ExprKind::Block(..)) if arg_count > 1 => true,
|
||||
Some(&ast::ExprKind::Block(..)) |
|
||||
Some(&ast::ExprKind::Match(..)) if arg_count > 1 => true,
|
||||
_ => false,
|
||||
};
|
||||
|
||||
|
@ -380,3 +380,11 @@ fn issue1460() {
|
||||
_ => "reorder_something",
|
||||
};
|
||||
}
|
||||
|
||||
fn issue525() {
|
||||
foobar(f, "{}", match *self {
|
||||
TaskState::Started => "started",
|
||||
TaskState::Success => "success",
|
||||
TaskState::Failed => "failed",
|
||||
});
|
||||
}
|
||||
|
@ -398,3 +398,11 @@ fn issue1460() {
|
||||
_ => "reorder_something",
|
||||
};
|
||||
}
|
||||
|
||||
fn issue525() {
|
||||
foobar(f, "{}", match *self {
|
||||
TaskState::Started => "started",
|
||||
TaskState::Success => "success",
|
||||
TaskState::Failed => "failed",
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user