mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 01:28:18 +03:00
Merge pull request #1520 from topecongiro/allow-match
Apply closure exception to match in args
This commit is contained in:
+2
-1
@@ -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",
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user