@@ -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
}
@@ -1025,7 +1025,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &
1025
1025
"trait {}{}{} = {};" ,
1026
1026
it. name. unwrap( ) ,
1027
1027
t. generics. print( cx) ,
1028
- print_where_clause( & t. generics, cx, 0 , true ) ,
1028
+ print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1029
1029
bounds( & t. bounds, true , cx)
1030
1030
) ;
1031
1031
} ) ;
@@ -1049,7 +1049,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &cl
1049
1049
"type {}{}{where_clause} = impl {bounds};" ,
1050
1050
it. name. unwrap( ) ,
1051
1051
t. generics. print( cx) ,
1052
- where_clause = print_where_clause( & t. generics, cx, 0 , true ) ,
1052
+ where_clause = print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1053
1053
bounds = bounds( & t. bounds, false , cx) ,
1054
1054
) ;
1055
1055
} ) ;
@@ -1074,7 +1074,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
1074
1074
"type {}{}{where_clause} = {type_};" ,
1075
1075
it. name. unwrap( ) ,
1076
1076
t. generics. print( cx) ,
1077
- where_clause = print_where_clause( & t. generics, cx, 0 , true ) ,
1077
+ where_clause = print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
1078
1078
type_ = t. type_. print( cx) ,
1079
1079
) ;
1080
1080
} ) ;
@@ -1784,7 +1784,7 @@ fn render_struct(
1784
1784
}
1785
1785
w. write_str ( ")" ) ;
1786
1786
if let Some ( g) = g {
1787
- write ! ( w, "{}" , print_where_clause( g, cx, 0 , false ) ) ;
1787
+ write ! ( w, "{}" , print_where_clause( g, cx, 0 , Ending :: NoNewline ) ) ;
1788
1788
}
1789
1789
// We only want a ";" when we are displaying a tuple struct, not a variant tuple struct.
1790
1790
if structhead {
@@ -1794,7 +1794,7 @@ fn render_struct(
1794
1794
CtorKind :: Const => {
1795
1795
// Needed for PhantomData.
1796
1796
if let Some ( g) = g {
1797
- write ! ( w, "{}" , print_where_clause( g, cx, 0 , false ) ) ;
1797
+ write ! ( w, "{}" , print_where_clause( g, cx, 0 , Ending :: NoNewline ) ) ;
1798
1798
}
1799
1799
w. write_str ( ";" ) ;
1800
1800
}
0 commit comments