Use correct indent for return type when it goes multi line

This commit is contained in:
topecongiro 2017-06-12 16:23:10 +09:00
parent 272b0b6f49
commit d269189f19
3 changed files with 16 additions and 1 deletions

View File

@ -1798,7 +1798,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) {
}