mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-02 18:12:51 +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));
|
let generics_str = try_opt!(rewrite_generics(context, generics, shape, generics_span));
|
||||||
result.push_str(&generics_str);
|
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
|
// Note that the width and indent don't really matter, we'll re-layout the
|
||||||
// return type later anyway.
|
// return type later anyway.
|
||||||
|
@ -52,8 +52,7 @@ impl Foo {
|
|||||||
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
||||||
TTTTTTTTTTTTT,
|
TTTTTTTTTTTTT,
|
||||||
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
||||||
>
|
>(
|
||||||
(
|
|
||||||
a: Aaaaaaaaaaaaaaa,
|
a: Aaaaaaaaaaaaaaa,
|
||||||
) {
|
) {
|
||||||
bar();
|
bar();
|
||||||
|
@ -54,8 +54,7 @@ impl Foo {
|
|||||||
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
'a: 'bbbbbbbbbbbbbbbbbbbbbbbbbbb,
|
||||||
TTTTTTTTTTTTT,
|
TTTTTTTTTTTTT,
|
||||||
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
UUUUUUUUUUUUUUUUUUUU: WWWWWWWWWWWWWWWWWWWWWWWW
|
||||||
>
|
>(
|
||||||
(
|
|
||||||
a: Aaaaaaaaaaaaaaa,
|
a: Aaaaaaaaaaaaaaa,
|
||||||
) {
|
) {
|
||||||
bar();
|
bar();
|
||||||
|
Loading…
Reference in New Issue
Block a user