@@ -29,7 +29,7 @@ use crate::formats::{AssocItemRender, Impl, RenderMode};
2929use crate :: html:: escape:: Escape ;
3030use crate :: html:: format:: {
3131 join_with_double_colon, print_abi_with_space, print_constness_with_space, print_where_clause,
32- Buffer , PrintWithSpace ,
32+ Buffer , Ending , PrintWithSpace ,
3333} ;
3434use crate :: html:: highlight;
3535use crate :: html:: layout:: Page ;
@@ -69,7 +69,7 @@ fn print_where_clause_and_check<'a, 'tcx: 'a>(
6969 cx : & ' a Context < ' tcx > ,
7070) -> bool {
7171 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 ) ) ;
7373 len_before != buffer. len ( )
7474}
7575
@@ -519,7 +519,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle
519519 abi = abi,
520520 name = name,
521521 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 ) ,
523523 decl = f. decl. full_print( header_len, 0 , header. asyncness, cx) ,
524524 notable_traits = notable_traits_decl( & f. decl, cx) ,
525525 ) ;
@@ -556,7 +556,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
556556 ) ;
557557
558558 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 ) ) ;
560560 } else {
561561 w. write_str ( " " ) ;
562562 }
@@ -1025,7 +1025,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &
10251025 "trait {}{}{} = {};" ,
10261026 it. name. unwrap( ) ,
10271027 t. generics. print( cx) ,
1028- print_where_clause( & t. generics, cx, 0 , true ) ,
1028+ print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
10291029 bounds( & t. bounds, true , cx)
10301030 ) ;
10311031 } ) ;
@@ -1049,7 +1049,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &cl
10491049 "type {}{}{where_clause} = impl {bounds};" ,
10501050 it. name. unwrap( ) ,
10511051 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 ) ,
10531053 bounds = bounds( & t. bounds, false , cx) ,
10541054 ) ;
10551055 } ) ;
@@ -1074,7 +1074,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
10741074 "type {}{}{where_clause} = {type_};" ,
10751075 it. name. unwrap( ) ,
10761076 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 ) ,
10781078 type_ = t. type_. print( cx) ,
10791079 ) ;
10801080 } ) ;
@@ -1784,7 +1784,7 @@ fn render_struct(
17841784 }
17851785 w. write_str ( ")" ) ;
17861786 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 ) ) ;
17881788 }
17891789 // We only want a ";" when we are displaying a tuple struct, not a variant tuple struct.
17901790 if structhead {
@@ -1794,7 +1794,7 @@ fn render_struct(
17941794 CtorKind :: Const => {
17951795 // Needed for PhantomData.
17961796 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 ) ) ;
17981798 }
17991799 w. write_str ( ";" ) ;
18001800 }
0 commit comments