diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs index bed8f6ffef5..a9c0ab557cb 100644 --- a/src/librustdoc/html/format.rs +++ b/src/librustdoc/html/format.rs @@ -367,7 +367,7 @@ pub(crate) fn print_where_clause<'a, 'tcx: 'a>( if ending == Ending::Newline { let mut clause = " ".repeat(indent.saturating_sub(1)); - write!(clause, "where{where_preds},")?; + write!(clause, "
= Pair; // @has 'inner_types_lazy/type.ReadWrite.html' // @count - '//*[@id="aliased-type"]' 1 // @count - '//*[@id="variants"]' 0 // @count - '//*[@id="fields"]' 1 -// @count - '//span[@class="where fmt-newline"]' 2 +// @count - '//div[@class="where"]' 2 pub type ReadWrite = Pair where R: std::io::Read, @@ -30,5 +30,5 @@ pub struct Pair { // @count - '//*[@id="aliased-type"]' 1 // @count - '//*[@id="variants"]' 0 // @count - '//*[@id="fields"]' 1 -// @count - '//span[@class="where fmt-newline"]' 0 +// @count - '//div[@class="where"]' 0 pub type VecPair = Pair , Vec >; diff --git a/tests/rustdoc/where.SWhere_Echo_impl.html b/tests/rustdoc/where.SWhere_Echo_impl.html index 7517eb090f4..726196281a5 100644 --- a/tests/rustdoc/where.SWhere_Echo_impl.html +++ b/tests/rustdoc/where.SWhere_Echo_impl.html @@ -1,2 +1,2 @@ - impl<D> Delta<D>where - D: MyTrait,
\ No newline at end of file +impl<D> Delta<D>
\ No newline at end of file diff --git a/tests/rustdoc/where.bravo_trait_decl.html b/tests/rustdoc/where.bravo_trait_decl.html index 00524201a8a..3f1c994b0b2 100644 --- a/tests/rustdoc/where.bravo_trait_decl.html +++ b/tests/rustdoc/where.bravo_trait_decl.html @@ -1,5 +1,5 @@ -where + D: MyTrait,pub trait Bravo<B>where - B: MyTrait,{ +
pub trait Bravo<B>
\ No newline at end of file diff --git a/tests/rustdoc/where.charlie_fn_decl.html b/tests/rustdoc/where.charlie_fn_decl.html index 8e3bc8b01ec..4dd410435c1 100644 --- a/tests/rustdoc/where.charlie_fn_decl.html +++ b/tests/rustdoc/where.charlie_fn_decl.html @@ -1,2 +1,2 @@ -where + B: MyTrait,{ // Required method fn get(&self, B: B); }pub fn charlie<C>()where - C: MyTrait,
\ No newline at end of file +pub fn charlie<C>()
\ No newline at end of file diff --git a/tests/rustdoc/where.golf_type_alias_decl.html b/tests/rustdoc/where.golf_type_alias_decl.html index 8da5402f900..ab60bb262da 100644 --- a/tests/rustdoc/where.golf_type_alias_decl.html +++ b/tests/rustdoc/where.golf_type_alias_decl.html @@ -1,2 +1,2 @@ -where + C: MyTrait,pub type Golf<T>where - T: Clone, = (T, T);
\ No newline at end of file +pub type Golf<T>
\ No newline at end of file diff --git a/tests/rustdoc/whitespace-after-where-clause.enum.html b/tests/rustdoc/whitespace-after-where-clause.enum.html index ff4971f33cd..25e02145323 100644 --- a/tests/rustdoc/whitespace-after-where-clause.enum.html +++ b/tests/rustdoc/whitespace-after-where-clause.enum.html @@ -1,5 +1,5 @@ -where + T: Clone,= (T, T);pub enum Cow<'a, B>where - B: ToOwned<()> + ?Sized + 'a,{ +
\ No newline at end of file diff --git a/tests/rustdoc/whitespace-after-where-clause.struct.html b/tests/rustdoc/whitespace-after-where-clause.struct.html index ca685358633..bc62a3a0015 100644 --- a/tests/rustdoc/whitespace-after-where-clause.struct.html +++ b/tests/rustdoc/whitespace-after-where-clause.struct.html @@ -1,5 +1,5 @@ -pub enum Cow<'a, B>{ Borrowed(&'a B), Whatever(u32), }
pub struct Struct<'a, B>where - B: ToOwned<()> + ?Sized + 'a,{ +
\ No newline at end of file diff --git a/tests/rustdoc/whitespace-after-where-clause.trait.html b/tests/rustdoc/whitespace-after-where-clause.trait.html index 0928b48e6b6..0e25ed86a7c 100644 --- a/tests/rustdoc/whitespace-after-where-clause.trait.html +++ b/tests/rustdoc/whitespace-after-where-clause.trait.html @@ -1,5 +1,5 @@ -pub struct Struct<'a, B>{ pub a: &'a B, pub b: u32, }
pub trait ToOwned<T>where - T: Clone,{ +
pub trait ToOwned<T>
where + T: Clone,{ type Owned; // Required methods diff --git a/tests/rustdoc/whitespace-after-where-clause.union.html b/tests/rustdoc/whitespace-after-where-clause.union.html index 40b0c671284..7e0d5f8717a 100644 --- a/tests/rustdoc/whitespace-after-where-clause.union.html +++ b/tests/rustdoc/whitespace-after-where-clause.union.html @@ -1,4 +1,4 @@ -pub union Union<'a, B>where - B: ToOwned<()> + ?Sized + 'a,{ +
\ No newline at end of filepub union Union<'a, B>{ /* private fields */ }