Merge pull request #1655 from topecongiro/issue-1652

Use correct indent for return type when it goes multi line
This commit is contained in:
Nick Cameron 2017-06-13 11:57:30 +12:00 committed by GitHub
commit 5d78d1fe00
3 changed files with 16 additions and 1 deletions

View File

@ -1846,7 +1846,7 @@ fn rewrite_fn_base(context: &RewriteContext,
indent
} else {
result.push(' ');
Indent::new(indent.width(), result.len())
Indent::new(indent.block_indent, last_line_width(&result))
};
if multi_line_ret_str || ret_should_indent {

View File

@ -20,3 +20,7 @@ extern "C" {
second_parameter: SecondParameterType,
...);
}
// #1652
fn deconstruct(foo: Bar) -> (SocketAddr, Header, Method, RequestUri, HttpVersion, AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {
}

View File

@ -32,3 +32,14 @@ extern "C" {
...
);
}
// #1652
fn deconstruct(
foo: Bar,
) -> (SocketAddr,
Header,
Method,
RequestUri,
HttpVersion,
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA) {
}