@@ -29,7 +29,7 @@ use crate::formats::{AssocItemRender, Impl, RenderMode};
29
29
use crate :: html:: escape:: Escape ;
30
30
use crate :: html:: format:: {
31
31
join_with_double_colon, print_abi_with_space, print_constness_with_space, print_where_clause,
32
- Buffer , PrintWithSpace ,
32
+ Buffer , Ending , PrintWithSpace ,
33
33
} ;
34
34
use crate :: html:: highlight;
35
35
use crate :: html:: layout:: Page ;
@@ -69,7 +69,7 @@ fn print_where_clause_and_check<'a, 'tcx: 'a>(
69
69
cx : & ' a Context < ' tcx > ,
70
70
) -> bool {
71
71
let len_before = buffer. len ( ) ;
72
- write ! ( buffer, "{}" , print_where_clause( gens, cx, 0 , true ) ) ;
72
+ write ! ( buffer, "{}" , print_where_clause( gens, cx, 0 , Ending :: Newline ) ) ;
73
73
len_before != buffer. len ( )
74
74
}
75
75
@@ -519,7 +519,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle
519
519
abi = abi,
520
520
name = name,
521
521
generics = f. generics. print( cx) ,
522
- where_clause = print_where_clause( & f. generics, cx, 0 , true ) ,
522
+ where_clause = print_where_clause( & f. generics, cx, 0 , Ending :: Newline ) ,
523
523
decl = f. decl. full_print( header_len, 0 , header. asyncness, cx) ,
524
524
notable_traits = notable_traits_decl( & f. decl, cx) ,
525
525
) ;
@@ -556,7 +556,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
556
556
) ;
557
557
558
558
if !t. generics . where_predicates . is_empty ( ) {
559
- write ! ( w, "{}" , print_where_clause( & t. generics, cx, 0 , true ) ) ;
559
+ write ! ( w, "{}" , print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ) ;
560
560
} else {
561
561
w. write_str ( " " ) ;
562
562
}
@@ -1026,7 +1026,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &
1026
1026
"trait {}{}{} = {};" ,
1027
1027
it. name. unwrap( ) ,
1028
1028
t. generics. print( cx) ,
1029
- print_where_clause( & t. generics, cx, 0 , true ) ,
1029
+ print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1030
1030
bounds( & t. bounds, true , cx)
1031
1031
) ;
1032
1032
} ) ;
@@ -1050,7 +1050,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &cl
1050
1050
"type {}{}{where_clause} = impl {bounds};" ,
1051
1051
it. name. unwrap( ) ,
1052
1052
t. generics. print( cx) ,
1053
- where_clause = print_where_clause( & t. generics, cx, 0 , true ) ,
1053
+ where_clause = print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1054
1054
bounds = bounds( & t. bounds, false , cx) ,
1055
1055
) ;
1056
1056
} ) ;
@@ -1075,7 +1075,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
1075
1075
"type {}{}{where_clause} = {type_};" ,
1076
1076
it. name. unwrap( ) ,
1077
1077
t. generics. print( cx) ,
1078
- where_clause = print_where_clause( & t. generics, cx, 0 , true ) ,
1078
+ where_clause = print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1079
1079
type_ = t. type_. print( cx) ,
1080
1080
) ;
1081
1081
} ) ;
@@ -1786,7 +1786,7 @@ fn render_struct(
1786
1786
}
1787
1787
w. write_str ( ")" ) ;
1788
1788
if let Some ( g) = g {
1789
- write ! ( w, "{}" , print_where_clause( g, cx, 0 , false ) ) ;
1789
+ write ! ( w, "{}" , print_where_clause( g, cx, 0 , Ending :: NoNewline ) ) ;
1790
1790
}
1791
1791
// We only want a ";" when we are displaying a tuple struct, not a variant tuple struct.
1792
1792
if structhead {
@@ -1796,7 +1796,7 @@ fn render_struct(
1796
1796
CtorKind :: Const => {
1797
1797
// Needed for PhantomData.
1798
1798
if let Some ( g) = g {
1799
- write ! ( w, "{}" , print_where_clause( g, cx, 0 , false ) ) ;
1799
+ write ! ( w, "{}" , print_where_clause( g, cx, 0 , Ending :: NoNewline ) ) ;
1800
1800
}
1801
1801
w. write_str ( ";" ) ;
1802
1802
}
0 commit comments