mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 13:13:17 +00:00
Put opening paren next to multi line generic
This commit is contained in:
parent
5650411d64
commit
d21792a730
@ -1587,7 +1587,10 @@ fn rewrite_fn_base(context: &RewriteContext,
|
||||
let generics_str = try_opt!(rewrite_generics(context, generics, shape, generics_span));
|
||||
result.push_str(&generics_str);
|
||||
|
||||
let snuggle_angle_bracket = last_line_width(&generics_str) == 1;
|
||||
let snuggle_angle_bracket = generics_str
|
||||
.lines()
|
||||
.last()
|
||||
.map_or(false, |l| l.trim_left().len() == 1);
|
||||
|
||||
// Note that the width and indent don't really matter, we'll re-layout the
|
||||
// return type later anyway.
|
||||
|
@ -52,8 +52,7 @@ impl Foo {
|
||||
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
||||
TTTTTTTTTTTTT,
|
||||
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
||||
>
|
||||
(
|
||||
>(
|
||||
a: Aaaaaaaaaaaaaaa,
|
||||
) {
|
||||
bar();
|
||||
|
@ -54,8 +54,7 @@ impl Foo {
|
||||
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
||||
TTTTTTTTTTTTT,
|
||||
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
||||
>
|
||||
(
|
||||
>(
|
||||
a: Aaaaaaaaaaaaaaa,
|
||||
) {
|
||||
bar();
|
||||
|
Loading…
Reference in New Issue
Block a user