@@ -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 }
@@ -1026,7 +1026,7 @@ fn item_trait_alias(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &
10261026 "trait {}{}{} = {};" ,
10271027 it. name. unwrap( ) ,
10281028 t. generics. print( cx) ,
1029- print_where_clause( & t. generics, cx, 0 , true ) ,
1029+ print_where_clause( & t. generics, cx, 0 , Ending :: Newline ) ,
10301030 bounds( & t. bounds, true , cx)
10311031 ) ;
10321032 } ) ;
@@ -1050,7 +1050,7 @@ fn item_opaque_ty(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &cl
10501050 "type {}{}{where_clause} = impl {bounds};" ,
10511051 it. name. unwrap( ) ,
10521052 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 ) ,
10541054 bounds = bounds( & t. bounds, false , cx) ,
10551055 ) ;
10561056 } ) ;
@@ -1075,7 +1075,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
10751075 "type {}{}{where_clause} = {type_};" ,
10761076 it. name. unwrap( ) ,
10771077 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 ) ,
10791079 type_ = t. type_. print( cx) ,
10801080 ) ;
10811081 } ) ;
@@ -1786,7 +1786,7 @@ fn render_struct(
17861786 }
17871787 w. write_str ( ")" ) ;
17881788 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 ) ) ;
17901790 }
17911791 // We only want a ";" when we are displaying a tuple struct, not a variant tuple struct.
17921792 if structhead {
@@ -1796,7 +1796,7 @@ fn render_struct(
17961796 CtorKind :: Const => {
17971797 // Needed for PhantomData.
17981798 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 ) ) ;
18001800 }
18011801 w. write_str ( ";" ) ;
18021802 }
0 commit comments