diff options
| author | topecongiro <seuchida@gmail.com> | 2017-05-23 12:03:04 +0900 |
|---|---|---|
| committer | topecongiro <seuchida@gmail.com> | 2017-05-23 13:26:59 +0900 |
| commit | f83c22f24f2f497c454531e101cf63bf825e3bd5 (patch) | |
| tree | 69e6a0cdceb630460c8ca27288b53b2c52925f35 /tests/source/expr-block.rs | |
| parent | b4cd9584b380b196d9f599916180136c66694d71 (diff) | |
Add trailing comma to a single arg in multiline
Diffstat (limited to 'tests/source/expr-block.rs')
| -rw-r--r-- | tests/source/expr-block.rs | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/source/expr-block.rs b/tests/source/expr-block.rs index 14207b5adb9..27f7ff67da9 100644 --- a/tests/source/expr-block.rs +++ b/tests/source/expr-block.rs @@ -191,6 +191,19 @@ fn combine_block() { }, ); + do_thing( + x, + ( + 1, + 2, + 3, + |param| { + action(); + foo(param) + }, + ), + ); + Ok( some_function( lllllllllong_argument_one, @@ -226,6 +239,21 @@ fn combine_block() { long_argument_two, long_argument_three, )), + Some(x) => |x| { + let y = x + 1; + let z = y + 1; + z + }, + Some(x) => (1, 2, |x| { + let y = x + 1; + let z = y + 1; + z + }), + Some(x) => SomeStruct { + f1: long_argument_one, + f2: long_argument_two, + f3: long_argument_three, + }, None => Ok(SomeStruct { f1: long_argument_one, f2: long_argument_two, |
