summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc')
-rw-r--r--tests/rustdoc/async-fn-opaque-item.rs4
-rw-r--r--tests/rustdoc/auxiliary/issue-36031.rs9
-rw-r--r--tests/rustdoc/auxiliary/issue-40936.rs5
-rw-r--r--tests/rustdoc/auxiliary/issue-48414.rs5
-rw-r--r--tests/rustdoc/compiler-derive-proc-macro.rs6
-rw-r--r--tests/rustdoc/deprecated-future-staged-api.rs2
-rw-r--r--tests/rustdoc/doctest/auxiliary/empty.rs1
-rw-r--r--tests/rustdoc/doctest/doctest-cfg-feature-30252.rs (renamed from tests/rustdoc/doctest-cfg-feature-30252.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-crate-attributes-38129.rs (renamed from tests/rustdoc/issue-38129.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs (renamed from tests/rustdoc/doctest-hide-empty-line-23106.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-ignore-32556.rs (renamed from tests/rustdoc/doctest-ignore-32556.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-include-43153.rs (renamed from tests/rustdoc/issue-43153.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-macro-38219.rs (renamed from tests/rustdoc/issue-38219.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-manual-crate-name.rs (renamed from tests/rustdoc/doctest-manual-crate-name.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs (renamed from tests/rustdoc/doctest-markdown-inline-parse-23744.rs)0
-rw-r--r--tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs (renamed from tests/rustdoc/issue-48377.rs)2
-rw-r--r--tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs (renamed from tests/rustdoc/doctest-multi-line-string-literal-25944.rs)0
-rw-r--r--tests/rustdoc/enum-variant-fields-heading.rs18
-rw-r--r--tests/rustdoc/enum-variant-fields-heading.variants.html3
-rw-r--r--tests/rustdoc/enum-variant-private-46767.rs (renamed from tests/rustdoc/issue-46767.rs)1
-rw-r--r--tests/rustdoc/foreign-implementors-js-43701.rs (renamed from tests/rustdoc/issue-43701.rs)1
-rw-r--r--tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs4
-rw-r--r--tests/rustdoc/inline-rename-34473.rs (renamed from tests/rustdoc/issue-34473.rs)2
-rw-r--r--tests/rustdoc/inline_local/enum-variant-reexport-46766.rs (renamed from tests/rustdoc/issue-46766.rs)1
-rw-r--r--tests/rustdoc/issue-105735-overlapping-reexport-2.rs6
-rw-r--r--tests/rustdoc/issue-105735-overlapping-reexport.rs6
-rw-r--r--tests/rustdoc/issue-109258-missing-private-inlining.rs10
-rw-r--r--tests/rustdoc/issue-109449-doc-hidden-reexports.rs12
-rw-r--r--tests/rustdoc/issue-110422-inner-private.rs18
-rw-r--r--tests/rustdoc/issue-118180-empty-tuple-struct.rs9
-rw-r--r--tests/rustdoc/issue-34423.rs10
-rw-r--r--tests/rustdoc/issue-36031.rs9
-rw-r--r--tests/rustdoc/issue-40936.rs6
-rw-r--r--tests/rustdoc/issue-43893.rs19
-rw-r--r--tests/rustdoc/issue-46271.rs5
-rw-r--r--tests/rustdoc/issue-46976.rs1
-rw-r--r--tests/rustdoc/issue-47639.rs6
-rw-r--r--tests/rustdoc/issue-48414.rs11
-rw-r--r--tests/rustdoc/issue-60522-duplicated-glob-reexport.rs4
-rw-r--r--tests/rustdoc/nested-items-issue-111415.rs8
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html2
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html2
-rw-r--r--tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html2
-rw-r--r--tests/rustdoc/private-use-decl-macro-47038.rs (renamed from tests/rustdoc/issue-47038.rs)2
-rw-r--r--tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs (renamed from tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs)8
-rw-r--r--tests/rustdoc/reexport-cfg.rs30
-rw-r--r--tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs4
-rw-r--r--tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs4
-rw-r--r--tests/rustdoc/rfc-2632-const-trait-impl.rs10
-rw-r--r--tests/rustdoc/src-links-implementor-43893.rs21
-rw-r--r--tests/rustdoc/stability.rs11
-rw-r--r--tests/rustdoc/trait-implementations-duplicate-self-45584.rs (renamed from tests/rustdoc/issue-45584.rs)2
-rw-r--r--tests/rustdoc/tuple-struct-where-clause-34928.rs (renamed from tests/rustdoc/issue-34928.rs)2
-rw-r--r--tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs6
-rw-r--r--tests/rustdoc/typedef-inner-variants.rs4
-rw-r--r--tests/rustdoc/where.SWhere_Echo_impl.html4
-rw-r--r--tests/rustdoc/where.SWhere_Simd_item-decl.html4
-rw-r--r--tests/rustdoc/where.alpha_trait_decl.html2
-rw-r--r--tests/rustdoc/where.bravo_trait_decl.html4
-rw-r--r--tests/rustdoc/where.charlie_fn_decl.html4
-rw-r--r--tests/rustdoc/where.golf_type_alias_decl.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.enum.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.struct.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.trait.html4
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union.html6
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union2.html2
68 files changed, 194 insertions, 170 deletions
diff --git a/tests/rustdoc/async-fn-opaque-item.rs b/tests/rustdoc/async-fn-opaque-item.rs
index a73e84f3f..2c030824f 100644
--- a/tests/rustdoc/async-fn-opaque-item.rs
+++ b/tests/rustdoc/async-fn-opaque-item.rs
@@ -9,7 +9,7 @@
// Checking there is only a "Functions" header and no "Opaque types".
// @has async_fn_opaque_item/index.html
-// @count - '//*[@class="small-section-header"]' 1
-// @has - '//*[@class="small-section-header"]' 'Functions'
+// @count - '//*[@class="section-header"]' 1
+// @has - '//*[@class="section-header"]' 'Functions'
pub async fn test() {}
diff --git a/tests/rustdoc/auxiliary/issue-36031.rs b/tests/rustdoc/auxiliary/issue-36031.rs
deleted file mode 100644
index da688139e..000000000
--- a/tests/rustdoc/auxiliary/issue-36031.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-pub trait Foo {
- const FOO: usize;
-}
-
-pub struct Bar;
-
-impl Bar {
- pub const BAR: usize = 3;
-}
diff --git a/tests/rustdoc/auxiliary/issue-40936.rs b/tests/rustdoc/auxiliary/issue-40936.rs
deleted file mode 100644
index b921e5201..000000000
--- a/tests/rustdoc/auxiliary/issue-40936.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-pub mod outermod {
- pub mod innermod {
- pub use super::*;
- }
-}
diff --git a/tests/rustdoc/auxiliary/issue-48414.rs b/tests/rustdoc/auxiliary/issue-48414.rs
deleted file mode 100644
index f442ac722..000000000
--- a/tests/rustdoc/auxiliary/issue-48414.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-/// Woah, this trait links to [OtherTrait](OtherTrait)!
-pub trait SomeTrait {}
-
-/// Woah, this trait links to [SomeTrait](SomeTrait)!
-pub trait OtherTrait {}
diff --git a/tests/rustdoc/compiler-derive-proc-macro.rs b/tests/rustdoc/compiler-derive-proc-macro.rs
index 489ec924c..1c3867ced 100644
--- a/tests/rustdoc/compiler-derive-proc-macro.rs
+++ b/tests/rustdoc/compiler-derive-proc-macro.rs
@@ -5,9 +5,9 @@
// @has 'foo/index.html'
// Each compiler builtin proc-macro has a trait equivalent so we should have
// a trait section as well.
-// @count - '//*[@id="main-content"]//*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Traits'
-// @has - '//*[@id="main-content"]//*[@class="small-section-header"]' 'Derive Macros'
+// @count - '//*[@id="main-content"]//*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Traits'
+// @has - '//*[@id="main-content"]//*[@class="section-header"]' 'Derive Macros'
// Now checking the correct file is generated as well.
// @has 'foo/derive.Clone.html'
diff --git a/tests/rustdoc/deprecated-future-staged-api.rs b/tests/rustdoc/deprecated-future-staged-api.rs
index 09120b8d4..64dfd8930 100644
--- a/tests/rustdoc/deprecated-future-staged-api.rs
+++ b/tests/rustdoc/deprecated-future-staged-api.rs
@@ -12,7 +12,7 @@ pub struct S1;
// @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
// 'Deprecation planned'
// @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \
-// 'Deprecating in a future Rust version: literally never'
+// 'Deprecating in a future version: literally never'
#[deprecated(since = "TBD", note = "literally never")]
#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")]
pub struct S2;
diff --git a/tests/rustdoc/doctest/auxiliary/empty.rs b/tests/rustdoc/doctest/auxiliary/empty.rs
new file mode 100644
index 000000000..d11c69f81
--- /dev/null
+++ b/tests/rustdoc/doctest/auxiliary/empty.rs
@@ -0,0 +1 @@
+// intentionally empty
diff --git a/tests/rustdoc/doctest-cfg-feature-30252.rs b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs
index ceb8076fe..ceb8076fe 100644
--- a/tests/rustdoc/doctest-cfg-feature-30252.rs
+++ b/tests/rustdoc/doctest/doctest-cfg-feature-30252.rs
diff --git a/tests/rustdoc/issue-38129.rs b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs
index 156d50fa5..156d50fa5 100644
--- a/tests/rustdoc/issue-38129.rs
+++ b/tests/rustdoc/doctest/doctest-crate-attributes-38129.rs
diff --git a/tests/rustdoc/doctest-hide-empty-line-23106.rs b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs
index 8e1e2cf09..8e1e2cf09 100644
--- a/tests/rustdoc/doctest-hide-empty-line-23106.rs
+++ b/tests/rustdoc/doctest/doctest-hide-empty-line-23106.rs
diff --git a/tests/rustdoc/doctest-ignore-32556.rs b/tests/rustdoc/doctest/doctest-ignore-32556.rs
index 99da9358b..99da9358b 100644
--- a/tests/rustdoc/doctest-ignore-32556.rs
+++ b/tests/rustdoc/doctest/doctest-ignore-32556.rs
diff --git a/tests/rustdoc/issue-43153.rs b/tests/rustdoc/doctest/doctest-include-43153.rs
index 0fe680f10..ec21a68c4 100644
--- a/tests/rustdoc/issue-43153.rs
+++ b/tests/rustdoc/doctest/doctest-include-43153.rs
@@ -1,3 +1,5 @@
+// https://github.com/rust-lang/rust/issues/43153
+
// Test that `include!` in a doc test searches relative to the directory in
// which the test is declared.
diff --git a/tests/rustdoc/issue-38219.rs b/tests/rustdoc/doctest/doctest-macro-38219.rs
index fa57c58c7..6c81df110 100644
--- a/tests/rustdoc/issue-38219.rs
+++ b/tests/rustdoc/doctest/doctest-macro-38219.rs
@@ -1,3 +1,5 @@
+// https://github.com/rust-lang/rust/issues/38219
+
// compile-flags:--test
// should-fail
diff --git a/tests/rustdoc/doctest-manual-crate-name.rs b/tests/rustdoc/doctest/doctest-manual-crate-name.rs
index 3a5e3734e..3a5e3734e 100644
--- a/tests/rustdoc/doctest-manual-crate-name.rs
+++ b/tests/rustdoc/doctest/doctest-manual-crate-name.rs
diff --git a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
index 128e2daba..128e2daba 100644
--- a/tests/rustdoc/doctest-markdown-inline-parse-23744.rs
+++ b/tests/rustdoc/doctest/doctest-markdown-inline-parse-23744.rs
diff --git a/tests/rustdoc/issue-48377.rs b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs
index c32bcf380..d481dc0dd 100644
--- a/tests/rustdoc/issue-48377.rs
+++ b/tests/rustdoc/doctest/doctest-markdown-trailing-docblock-48377.rs
@@ -1,5 +1,7 @@
// compile-flags:--test
+// https://github.com/rust-lang/rust/issues/48377
+
//! This is a doc comment
//!
//! ```rust
diff --git a/tests/rustdoc/doctest-multi-line-string-literal-25944.rs b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs
index eec796e4f..eec796e4f 100644
--- a/tests/rustdoc/doctest-multi-line-string-literal-25944.rs
+++ b/tests/rustdoc/doctest/doctest-multi-line-string-literal-25944.rs
diff --git a/tests/rustdoc/enum-variant-fields-heading.rs b/tests/rustdoc/enum-variant-fields-heading.rs
new file mode 100644
index 000000000..8a7c99a87
--- /dev/null
+++ b/tests/rustdoc/enum-variant-fields-heading.rs
@@ -0,0 +1,18 @@
+// This is a regression test for <https://github.com/rust-lang/rust/issues/118195>.
+// It ensures that the "Fields" heading is not generated if no field is displayed.
+
+#![crate_name = "foo"]
+
+// @has 'foo/enum.Foo.html'
+// @has - '//*[@id="variant.A"]' 'A'
+// @count - '//*[@id="variant.A.fields"]' 0
+// @has - '//*[@id="variant.B"]' 'B'
+// @count - '//*[@id="variant.B.fields"]' 0
+// @snapshot variants - '//*[@id="main-content"]/*[@class="variants"]'
+
+pub enum Foo {
+ /// A variant with no fields
+ A {},
+ /// A variant with hidden fields
+ B { #[doc(hidden)] a: u8 },
+}
diff --git a/tests/rustdoc/enum-variant-fields-heading.variants.html b/tests/rustdoc/enum-variant-fields-heading.variants.html
new file mode 100644
index 000000000..bcb36f7cf
--- /dev/null
+++ b/tests/rustdoc/enum-variant-fields-heading.variants.html
@@ -0,0 +1,3 @@
+<div class="variants"><section id="variant.A" class="variant"><a href="#variant.A" class="anchor">&#167;</a><h3 class="code-header">A</h3></section><div class="docblock"><p>A variant with no fields</p>
+</div><section id="variant.B" class="variant"><a href="#variant.B" class="anchor">&#167;</a><h3 class="code-header">B</h3></section><div class="docblock"><p>A variant with hidden fields</p>
+</div></div> \ No newline at end of file
diff --git a/tests/rustdoc/issue-46767.rs b/tests/rustdoc/enum-variant-private-46767.rs
index ef6ed104b..6386aa75a 100644
--- a/tests/rustdoc/issue-46767.rs
+++ b/tests/rustdoc/enum-variant-private-46767.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46767
#![crate_name = "foo"]
mod private {
diff --git a/tests/rustdoc/issue-43701.rs b/tests/rustdoc/foreign-implementors-js-43701.rs
index de772881e..3b16ad204 100644
--- a/tests/rustdoc/issue-43701.rs
+++ b/tests/rustdoc/foreign-implementors-js-43701.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/43701
#![crate_name = "foo"]
pub use std::vec::Vec;
diff --git a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs b/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
index e382940a4..ae830c03e 100644
--- a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
+++ b/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
@@ -6,8 +6,8 @@
// @has 'foo/index.html'
// There should only be one struct displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
// @has - '//*[@id="main-content"]//a[@href="struct.Reexport.html"]' 'Reexport'
// @has - '//*[@id="main-content"]//*[@class="desc docblock-short"]' 'Visible. Original.'
diff --git a/tests/rustdoc/issue-34473.rs b/tests/rustdoc/inline-rename-34473.rs
index 37da3dd19..7bc92cca1 100644
--- a/tests/rustdoc/issue-34473.rs
+++ b/tests/rustdoc/inline-rename-34473.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/34473
+
mod second {
pub struct SomeTypeWithLongName;
}
diff --git a/tests/rustdoc/issue-46766.rs b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs
index 36ab73956..ea6b7bac4 100644
--- a/tests/rustdoc/issue-46766.rs
+++ b/tests/rustdoc/inline_local/enum-variant-reexport-46766.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/46766
#![crate_name = "foo"]
pub enum Enum{Variant}
diff --git a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
index 5d2c553d8..2905e7d44 100644
--- a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
+++ b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs
@@ -7,9 +7,9 @@
// @has - '//*[@class="item-name"]/a[@class="type"]' 'AtomicU8'
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
// We also ensure we don't have another item displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
mod other {
pub type AtomicU8 = ();
diff --git a/tests/rustdoc/issue-105735-overlapping-reexport.rs b/tests/rustdoc/issue-105735-overlapping-reexport.rs
index 50f2450b9..7fa7df770 100644
--- a/tests/rustdoc/issue-105735-overlapping-reexport.rs
+++ b/tests/rustdoc/issue-105735-overlapping-reexport.rs
@@ -7,9 +7,9 @@
// @has - '//*[@class="item-name"]/a[@class="struct"]' 'AtomicU8'
// @has - '//*[@class="item-name"]/a[@class="constant"]' 'AtomicU8'
// We also ensure we don't have another item displayed.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
mod thing {
pub use core::sync::atomic::AtomicU8;
diff --git a/tests/rustdoc/issue-109258-missing-private-inlining.rs b/tests/rustdoc/issue-109258-missing-private-inlining.rs
index 96f606368..12c5556f1 100644
--- a/tests/rustdoc/issue-109258-missing-private-inlining.rs
+++ b/tests/rustdoc/issue-109258-missing-private-inlining.rs
@@ -4,9 +4,9 @@
// @has 'foo/index.html'
// We should only have a "Re-exports" and a "Modules" headers.
-// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 2
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Re-exports'
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Modules'
+// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 2
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Re-exports'
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Modules'
// @has - '//*[@id="reexport.Foo"]' 'pub use crate::issue_109258::Foo;'
// @has - '//*[@id="reexport.Foo"]//a[@href="issue_109258/struct.Foo.html"]' 'Foo'
@@ -15,8 +15,8 @@ pub use crate::issue_109258::Foo;
// @has 'foo/issue_109258/index.html'
// We should only have a "Structs" header.
-// @count - '//*[@id="main-content"]/h2[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/h2[@class="small-section-header"]' 'Structs'
+// @count - '//*[@id="main-content"]/h2[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/h2[@class="section-header"]' 'Structs'
// @has - '//*[@id="main-content"]//a[@href="struct.Foo.html"]' 'Foo'
// @has 'foo/issue_109258/struct.Foo.html'
pub mod issue_109258 {
diff --git a/tests/rustdoc/issue-109449-doc-hidden-reexports.rs b/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
index 3b836a219..9fb2f7c7c 100644
--- a/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
+++ b/tests/rustdoc/issue-109449-doc-hidden-reexports.rs
@@ -66,8 +66,8 @@ pub mod single_reexport_inherit_hidden {
pub mod single_reexport_no_inline {
// First we ensure that we only have re-exports and no inlined items.
// @has 'foo/single_reexport_no_inline/index.html'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
// Now we check that we don't have links to the items, just `pub use`.
// @has - '//*[@id="main-content"]//*' 'pub use crate::private_module::Public as XFoo;'
@@ -101,10 +101,10 @@ pub mod glob_reexport {
// With glob re-exports, we don't inline `#[doc(hidden)]` items so only `module` items
// should be inlined.
// @has 'foo/glob_reexport/index.html'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Type Aliases'
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Type Aliases'
// Now we check we have 1 re-export and 2 inlined items.
// If not item from a glob re-export is visible, we don't show the re-export.
diff --git a/tests/rustdoc/issue-110422-inner-private.rs b/tests/rustdoc/issue-110422-inner-private.rs
index ee8ed5cc6..43dc929ab 100644
--- a/tests/rustdoc/issue-110422-inner-private.rs
+++ b/tests/rustdoc/issue-110422-inner-private.rs
@@ -8,11 +8,11 @@
// @has 'foo/index.html'
// Checking there is no "trait" entry.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 4
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Constants'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Macros'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 4
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Constants'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Macros'
// @has - '//a[@href="fn.foo.html"]' 'foo'
fn foo() {
@@ -50,11 +50,11 @@ const BAR: i32 = {
// @has 'foo/struct.Bar.html'
// @has - '//*[@id="method.foo"]/*[@class="code-header"]' 'pub(crate) fn foo()'
- // @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
+ // @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
// We now check that the `Foo` trait is not documented nor visible on `Bar` page.
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Implementations'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Auto Trait Implementations'
- // @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Blanket Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Auto Trait Implementations'
+ // @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Blanket Implementations'
// @!has - '//*[@href="trait.Foo.html#method.babar"]/*[@class="code-header"]' 'fn babar()'
impl Bar {
fn foo() {}
diff --git a/tests/rustdoc/issue-118180-empty-tuple-struct.rs b/tests/rustdoc/issue-118180-empty-tuple-struct.rs
new file mode 100644
index 000000000..bc6ddbe5d
--- /dev/null
+++ b/tests/rustdoc/issue-118180-empty-tuple-struct.rs
@@ -0,0 +1,9 @@
+// @has issue_118180_empty_tuple_struct/enum.Enum.html
+pub enum Enum {
+ // @has - '//*[@id="variant.Empty"]//h3' 'Empty()'
+ Empty(),
+}
+
+// @has issue_118180_empty_tuple_struct/struct.Empty.html
+// @has - '//pre/code' 'Empty()'
+pub struct Empty();
diff --git a/tests/rustdoc/issue-34423.rs b/tests/rustdoc/issue-34423.rs
deleted file mode 100644
index b429bf8c9..000000000
--- a/tests/rustdoc/issue-34423.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-pub struct Foo;
-
-pub trait Bar {
- #[doc(hidden)]
- fn bar() {}
-}
-
-impl Bar for Foo {
- fn bar() {}
-}
diff --git a/tests/rustdoc/issue-36031.rs b/tests/rustdoc/issue-36031.rs
deleted file mode 100644
index af1b32fd2..000000000
--- a/tests/rustdoc/issue-36031.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:issue-36031.rs
-// build-aux-docs
-// ignore-cross-compile
-
-#![crate_name = "foo"]
-
-extern crate issue_36031;
-
-pub use issue_36031::Foo;
diff --git a/tests/rustdoc/issue-40936.rs b/tests/rustdoc/issue-40936.rs
deleted file mode 100644
index 4d2e4c17b..000000000
--- a/tests/rustdoc/issue-40936.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// aux-build:issue-40936.rs
-// build-aux-docs
-
-#![crate_name = "foo"]
-
-extern crate issue_40936;
diff --git a/tests/rustdoc/issue-43893.rs b/tests/rustdoc/issue-43893.rs
deleted file mode 100644
index 95d551934..000000000
--- a/tests/rustdoc/issue-43893.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// ignore-cross-compile
-
-#![crate_name = "foo"]
-
-pub trait SomeTrait {}
-pub struct SomeStruct;
-
-// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#9'
-impl SomeTrait for usize {}
-
-// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#12-14'
-impl SomeTrait for SomeStruct {
- // deliberately multi-line impl
-}
-
-pub trait AnotherTrait {}
-
-// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/issue-43893.rs.html#19'
-impl<T> AnotherTrait for T {}
diff --git a/tests/rustdoc/issue-46271.rs b/tests/rustdoc/issue-46271.rs
deleted file mode 100644
index b38ef20c5..000000000
--- a/tests/rustdoc/issue-46271.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// hopefully this doesn't cause an ICE
-
-pub fn foo() {
- extern crate std;
-}
diff --git a/tests/rustdoc/issue-46976.rs b/tests/rustdoc/issue-46976.rs
deleted file mode 100644
index c59f8c72e..000000000
--- a/tests/rustdoc/issue-46976.rs
+++ /dev/null
@@ -1 +0,0 @@
-pub fn ice(f: impl Fn()) {}
diff --git a/tests/rustdoc/issue-47639.rs b/tests/rustdoc/issue-47639.rs
deleted file mode 100644
index 4b3456b86..000000000
--- a/tests/rustdoc/issue-47639.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-// This should not ICE
-pub fn test() {
- macro_rules! foo {
- () => ()
- }
-}
diff --git a/tests/rustdoc/issue-48414.rs b/tests/rustdoc/issue-48414.rs
deleted file mode 100644
index b35743d88..000000000
--- a/tests/rustdoc/issue-48414.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// aux-build:issue-48414.rs
-
-// ICE when resolving paths for a trait that linked to another trait, when both were in an external
-// crate
-
-#![crate_name = "base"]
-
-extern crate issue_48414;
-
-#[doc(inline)]
-pub use issue_48414::{SomeTrait, OtherTrait};
diff --git a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs b/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
index 1429b5e47..50def2c3c 100644
--- a/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
+++ b/tests/rustdoc/issue-60522-duplicated-glob-reexport.rs
@@ -5,8 +5,8 @@
#![crate_name = "foo"]
// @has 'foo/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Modules'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Modules'
// @count - '//*[@id="main-content"]/*[@class="item-table"]//*[@class="mod"]' 2
// @has - '//*[@id="main-content"]//*[@class="mod"]' 'banana'
// @has - '//*[@id="main-content"]//*[@href="banana/index.html"]' 'banana'
diff --git a/tests/rustdoc/nested-items-issue-111415.rs b/tests/rustdoc/nested-items-issue-111415.rs
index 9b7688c33..c117569d9 100644
--- a/tests/rustdoc/nested-items-issue-111415.rs
+++ b/tests/rustdoc/nested-items-issue-111415.rs
@@ -5,10 +5,10 @@
// @has 'foo/index.html'
// Checking there are only three sections.
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 3
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Structs'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Functions'
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 3
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Structs'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Functions'
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
// Checking that there are only three items.
// @count - '//*[@id="main-content"]//*[@class="item-name"]' 3
// @has - '//*[@id="main-content"]//a[@href="struct.Bar.html"]' 'Bar'
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html b/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
index 46be00a08..7d2a25891 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait-slice.bare_fn_matches.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"&amp;'static [SomeStruct]":"&lt;h3&gt;Notable traits for &lt;code&gt;&amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait_slice::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &amp;amp;[&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait_slice::SomeStruct\"&gt;SomeStruct&lt;/a&gt;]&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html b/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
index f592e3b37..9f71677cf 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.bare-fn.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html b/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
index e8f4f6000..38689c79f 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.some-struct-new.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/span&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"SomeStruct":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.SomeStruct.html\" title=\"struct doc_notable_trait::SomeStruct\"&gt;SomeStruct&lt;/a&gt;&lt;/div&gt;","Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html b/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
index e7909669b..c137be9e3 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
+++ b/tests/rustdoc/notable-trait/doc-notable_trait.wrap-me.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"Wrapper&lt;Self&gt;":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl&amp;lt;T: &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt;&amp;gt; &lt;a class=\"trait\" href=\"trait.SomeTrait.html\" title=\"trait doc_notable_trait::SomeTrait\"&gt;SomeTrait&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Wrapper.html\" title=\"struct doc_notable_trait::Wrapper\"&gt;Wrapper&lt;/a&gt;&amp;lt;T&amp;gt;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html b/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
index 5f54b7522..cce8739df 100644
--- a/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
+++ b/tests/rustdoc/notable-trait/spotlight-from-dependency.odd.html
@@ -1 +1 @@
-<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;span class=\"where fmt-newline\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/span&gt;&lt;span class=\"where fmt-newline\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/span&gt;"}</script> \ No newline at end of file
+<script type="text/json" id="notable-traits-data">{"Odd":"&lt;h3&gt;Notable traits for &lt;code&gt;&lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/code&gt;&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;&lt;div class=\"where\"&gt;impl &lt;a class=\"trait\" href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html\" title=\"trait core::iter::traits::iterator::Iterator\"&gt;Iterator&lt;/a&gt; for &lt;a class=\"struct\" href=\"struct.Odd.html\" title=\"struct foo::Odd\"&gt;Odd&lt;/a&gt;&lt;/div&gt;&lt;div class=\"where\"&gt; type &lt;a href=\"{{channel}}/core/iter/traits/iterator/trait.Iterator.html#associatedtype.Item\" class=\"associatedtype\"&gt;Item&lt;/a&gt; = &lt;a class=\"primitive\" href=\"{{channel}}/std/primitive.usize.html\"&gt;usize&lt;/a&gt;;&lt;/div&gt;"}</script> \ No newline at end of file
diff --git a/tests/rustdoc/issue-47038.rs b/tests/rustdoc/private-use-decl-macro-47038.rs
index 810ddca3e..8944bdd42 100644
--- a/tests/rustdoc/issue-47038.rs
+++ b/tests/rustdoc/private-use-decl-macro-47038.rs
@@ -2,6 +2,8 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/47038
+
use std::vec;
// @has 'foo/index.html'
diff --git a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs b/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs
index d8953eaf5..ae0aead24 100644
--- a/tests/rustdoc/issue-46506-pub-reexport-of-pub-reexport.rs
+++ b/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs
@@ -4,8 +4,8 @@
#![crate_name = "foo"]
// @has 'foo/associations/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Traits'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Traits'
// @has - '//*[@id="main-content"]//a[@href="trait.GroupedBy.html"]' 'GroupedBy'
// @has 'foo/associations/trait.GroupedBy.html'
pub mod associations {
@@ -16,8 +16,8 @@ pub mod associations {
}
// @has 'foo/prelude/index.html'
-// @count - '//*[@id="main-content"]/*[@class="small-section-header"]' 1
-// @has - '//*[@id="main-content"]/*[@class="small-section-header"]' 'Re-exports'
+// @count - '//*[@id="main-content"]/*[@class="section-header"]' 1
+// @has - '//*[@id="main-content"]/*[@class="section-header"]' 'Re-exports'
// @has - '//*[@id="main-content"]//*[@id="reexport.GroupedBy"]' 'pub use associations::GroupedBy;'
pub mod prelude {
pub use associations::GroupedBy;
diff --git a/tests/rustdoc/reexport-cfg.rs b/tests/rustdoc/reexport-cfg.rs
new file mode 100644
index 000000000..a6179fad8
--- /dev/null
+++ b/tests/rustdoc/reexport-cfg.rs
@@ -0,0 +1,30 @@
+// This test ensures that only the re-export `cfg` will be displayed and that it won't
+// include `cfg`s from the previous chained items.
+
+#![crate_name = "foo"]
+#![feature(doc_auto_cfg, doc_cfg)]
+
+mod foo {
+ #[cfg(not(feature = "foo"))]
+ pub struct Bar;
+
+ #[doc(cfg(not(feature = "bar")))]
+ pub struct Bar2;
+}
+
+// @has 'foo/index.html'
+// @has - '//*[@class="item-name"]' 'BabarNon-lie'
+#[cfg(not(feature = "lie"))]
+pub use crate::foo::Bar as Babar;
+
+// @has - '//*[@class="item-name"]' 'Babar2Non-cake'
+#[doc(cfg(not(feature = "cake")))]
+pub use crate::foo::Bar2 as Babar2;
+
+// @has - '//*[@class="item-table"]/li' 'pub use crate::Babar as Elephant;Non-robot'
+#[cfg(not(feature = "robot"))]
+pub use crate::Babar as Elephant;
+
+// @has - '//*[@class="item-table"]/li' 'pub use crate::Babar2 as Elephant2;Non-cat'
+#[doc(cfg(not(feature = "cat")))]
+pub use crate::Babar2 as Elephant2;
diff --git a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs b/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
index a79d05904..c81c654a2 100644
--- a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
+++ b/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
@@ -27,7 +27,7 @@ pub mod mod1 {
pub mod mod2 {
// @has - '//code' 'pub use tag::Portability;'
// @!has - '//span' 'Deprecated'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
pub use tag::Portability;
}
@@ -35,7 +35,7 @@ pub mod mod2 {
pub mod mod3 {
// @has - '//code' 'pub use tag::Both;'
// @has - '//span' 'Deprecated'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
pub use tag::Both;
}
diff --git a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs b/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
index ff8a910f5..423838e25 100644
--- a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
+++ b/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
@@ -35,7 +35,7 @@ pub mod mod1 {
pub mod mod2 {
// @has - '//code' 'pub use tag::Portability;'
// @!has - '//span' 'Experimental'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
#[stable(feature = "rust1", since = "1.0.0")]
pub use tag::Portability;
}
@@ -45,7 +45,7 @@ pub mod mod2 {
pub mod mod3 {
// @has - '//code' 'pub use tag::Both;'
// @has - '//span' 'Experimental'
- // @has - '//span' 'sync'
+ // @!has - '//span' 'sync'
#[stable(feature = "rust1", since = "1.0.0")]
pub use tag::Both;
}
diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/rfc-2632-const-trait-impl.rs
index 7f56b2ffe..6f264969e 100644
--- a/tests/rustdoc/rfc-2632-const-trait-impl.rs
+++ b/tests/rustdoc/rfc-2632-const-trait-impl.rs
@@ -23,7 +23,7 @@ pub trait Tr<T> {
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]' '~const'
// @has - '//section[@id="method.a"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where"]' '~const'
- // @has - '//section[@id="method.a"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+ // @has - '//section[@id="method.a"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
fn a<A: /* ~const */ Fn() + ~const Destruct>()
where
Option<A>: /* ~const */ Fn() + ~const Destruct,
@@ -35,7 +35,7 @@ pub trait Tr<T> {
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]' '~const'
// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where"]' '~const'
-// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+// @has - '//section[@id="impl-Tr%3CT%3E-for-T"]/h3[@class="code-header"]/div[@class="where"]' ': Fn'
impl<T: /* ~const */ Fn() + ~const Destruct> const Tr<T> for T
where
Option<T>: /* ~const */ Fn() + ~const Destruct,
@@ -49,8 +49,8 @@ where
// @!has foo/fn.foo.html '//pre[@class="rust item-decl"]/code/a[@class="trait"]' '~const'
// @has - '//pre[@class="rust item-decl"]/code/a[@class="trait"]' 'Fn'
-// @!has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' '~const'
-// @has - '//pre[@class="rust item-decl"]/code/span[@class="where fmt-newline"]' ': Fn'
+// @!has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' '~const'
+// @has - '//pre[@class="rust item-decl"]/code/div[@class="where"]' ': Fn'
pub const fn foo<F: /* ~const */ Fn() + ~const Destruct>()
where
Option<F>: /* ~const */ Fn() + ~const Destruct,
@@ -62,7 +62,7 @@ impl<T> S<T> {
// @!has foo/struct.S.html '//section[@id="method.foo"]/h4[@class="code-header"]' '~const'
// @has - '//section[@id="method.foo"]/h4[@class="code-header"]/a[@class="trait"]' 'Fn'
// @!has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where"]' '~const'
- // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/span[@class="where fmt-newline"]' ': Fn'
+ // @has - '//section[@id="method.foo"]/h4[@class="code-header"]/div[@class="where"]' ': Fn'
pub const fn foo<B, C: /* ~const */ Fn() + ~const Destruct>()
where
B: /* ~const */ Fn() + ~const Destruct,
diff --git a/tests/rustdoc/src-links-implementor-43893.rs b/tests/rustdoc/src-links-implementor-43893.rs
new file mode 100644
index 000000000..07e672847
--- /dev/null
+++ b/tests/rustdoc/src-links-implementor-43893.rs
@@ -0,0 +1,21 @@
+// ignore-cross-compile
+
+// https://github.com/rust-lang/rust/issues/43893
+
+#![crate_name = "foo"]
+
+pub trait SomeTrait {}
+pub struct SomeStruct;
+
+// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#11'
+impl SomeTrait for usize {}
+
+// @has foo/trait.SomeTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#14-16'
+impl SomeTrait for SomeStruct {
+ // deliberately multi-line impl
+}
+
+pub trait AnotherTrait {}
+
+// @has foo/trait.AnotherTrait.html '//a/@href' '../src/foo/src-links-implementor-43893.rs.html#21'
+impl<T> AnotherTrait for T {}
diff --git a/tests/rustdoc/stability.rs b/tests/rustdoc/stability.rs
index 90be2050d..c4d7118d0 100644
--- a/tests/rustdoc/stability.rs
+++ b/tests/rustdoc/stability.rs
@@ -2,6 +2,14 @@
#![unstable(feature = "test", issue = "none")]
+// @has stability/index.html
+// @has - '//ul[@class="item-table"]/li[1]//a' AaStable
+// @has - '//ul[@class="item-table"]/li[2]//a' ZzStable
+// @has - '//ul[@class="item-table"]/li[3]//a' Unstable
+
+#[stable(feature = "rust2", since = "2.2.2")]
+pub struct AaStable;
+
pub struct Unstable {
// @has stability/struct.Unstable.html \
// '//span[@class="item-info"]//div[@class="stab unstable"]' \
@@ -10,3 +18,6 @@ pub struct Unstable {
pub foo: u32,
pub bar: u32,
}
+
+#[stable(feature = "rust2", since = "2.2.2")]
+pub struct ZzStable;
diff --git a/tests/rustdoc/issue-45584.rs b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs
index 8a5f04138..77b8c05f2 100644
--- a/tests/rustdoc/issue-45584.rs
+++ b/tests/rustdoc/trait-implementations-duplicate-self-45584.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/45584
+
pub trait Bar<T, U> {}
// @has 'foo/struct.Foo1.html'
diff --git a/tests/rustdoc/issue-34928.rs b/tests/rustdoc/tuple-struct-where-clause-34928.rs
index 4184086f6..909b91468 100644
--- a/tests/rustdoc/issue-34928.rs
+++ b/tests/rustdoc/tuple-struct-where-clause-34928.rs
@@ -1,5 +1,7 @@
#![crate_name = "foo"]
+// https://github.com/rust-lang/rust/issues/34928
+
pub trait Bar {}
// @has foo/struct.Foo.html '//pre' 'pub struct Foo<T>(pub T) where T: Bar;'
diff --git a/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs b/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
index ff84352d7..bea25c75a 100644
--- a/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
+++ b/tests/rustdoc/typedef-inner-variants-lazy_type_alias.rs
@@ -13,14 +13,14 @@ pub struct Pair<A, B> {
// @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 ReversedTypesPair<Q, R> = Pair<R, Q>;
// @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<R, W> = Pair<R, W>
where
R: std::io::Read,
@@ -30,5 +30,5 @@ where
// @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<U, V> = Pair<Vec<U>, Vec<V>>;
diff --git a/tests/rustdoc/typedef-inner-variants.rs b/tests/rustdoc/typedef-inner-variants.rs
index b734714fd..4d0ff8555 100644
--- a/tests/rustdoc/typedef-inner-variants.rs
+++ b/tests/rustdoc/typedef-inner-variants.rs
@@ -65,7 +65,7 @@ pub union OneOr<A: Copy> {
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//*[@class="structfield small-section-header"]' 2
+// @count - '//*[@class="structfield section-header"]' 2
// @matches - '//pre[@class="rust item-decl"]//code' "union OneOrF64"
pub type OneOrF64 = OneOr<f64>;
@@ -81,7 +81,7 @@ pub struct One<T> {
// @count - '//*[@id="aliased-type"]' 1
// @count - '//*[@id="variants"]' 0
// @count - '//*[@id="fields"]' 1
-// @count - '//*[@class="structfield small-section-header"]' 1
+// @count - '//*[@class="structfield section-header"]' 1
// @matches - '//pre[@class="rust item-decl"]//code' "struct OneU64"
// @matches - '//pre[@class="rust item-decl"]//code' "pub val"
pub type OneU64 = One<u64>;
diff --git a/tests/rustdoc/where.SWhere_Echo_impl.html b/tests/rustdoc/where.SWhere_Echo_impl.html
index 7517eb090..726196281 100644
--- a/tests/rustdoc/where.SWhere_Echo_impl.html
+++ b/tests/rustdoc/where.SWhere_Echo_impl.html
@@ -1,2 +1,2 @@
-<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<span class="where fmt-newline">where
- D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></h3> \ No newline at end of file
+<h3 class="code-header">impl&lt;D&gt; <a class="struct" href="struct.Delta.html" title="struct foo::Delta">Delta</a>&lt;D&gt;<div class="where">where
+ D: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></h3> \ No newline at end of file
diff --git a/tests/rustdoc/where.SWhere_Simd_item-decl.html b/tests/rustdoc/where.SWhere_Simd_item-decl.html
index 46708b9e4..1987b1d59 100644
--- a/tests/rustdoc/where.SWhere_Simd_item-decl.html
+++ b/tests/rustdoc/where.SWhere_Simd_item-decl.html
@@ -1,3 +1,3 @@
-<pre class="rust item-decl"><code>pub struct Simd&lt;T&gt;(/* private fields */)
+<pre class="rust item-decl"><code>pub struct Simd&lt;T&gt;(<span class="comment">/* private fields */</span>)
<span class="where">where
- T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre>
+ T: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/where.alpha_trait_decl.html b/tests/rustdoc/where.alpha_trait_decl.html
index 0c0b2d1ce..2c010ca7c 100644
--- a/tests/rustdoc/where.alpha_trait_decl.html
+++ b/tests/rustdoc/where.alpha_trait_decl.html
@@ -1,3 +1,3 @@
-<code>pub struct Alpha&lt;A&gt;(/* private fields */)
+<code>pub struct Alpha&lt;A&gt;(<span class="comment">/* private fields */</span>)
<span class="where">where
A: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a></span>;</code> \ 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 00524201a..3f1c994b0 100644
--- a/tests/rustdoc/where.bravo_trait_decl.html
+++ b/tests/rustdoc/where.bravo_trait_decl.html
@@ -1,5 +1,5 @@
-<code>pub trait Bravo&lt;B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span>{
+<code>pub trait Bravo&lt;B&gt;<div class="where">where
+ B: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div>{
// Required method
fn <a href="#tymethod.get" class="fn">get</a>(&amp;self, B: B);
}</code> \ 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 8e3bc8b01..4dd410435 100644
--- a/tests/rustdoc/where.charlie_fn_decl.html
+++ b/tests/rustdoc/where.charlie_fn_decl.html
@@ -1,2 +1,2 @@
-<code>pub fn charlie&lt;C&gt;()<span class="where fmt-newline">where
- C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</span></code> \ No newline at end of file
+<code>pub fn charlie&lt;C&gt;()<div class="where">where
+ C: <a class="trait" href="trait.MyTrait.html" title="trait foo::MyTrait">MyTrait</a>,</div></code> \ 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 8da5402f9..ab60bb262 100644
--- a/tests/rustdoc/where.golf_type_alias_decl.html
+++ b/tests/rustdoc/where.golf_type_alias_decl.html
@@ -1,2 +1,2 @@
-<code>pub type Golf&lt;T&gt;<span class="where fmt-newline">where
- T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code> \ No newline at end of file
+<code>pub type Golf&lt;T&gt;<div class="where">where
+ T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div> = <a class="primitive" href="{{channel}}/std/primitive.tuple.html">(T, T)</a>;</code> \ 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 ff4971f33..25e021453 100644
--- a/tests/rustdoc/whitespace-after-where-clause.enum.html
+++ b/tests/rustdoc/whitespace-after-where-clause.enum.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+<pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>),
Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
}</code></pre> \ 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 ca6853586..bc62a3a00 100644
--- a/tests/rustdoc/whitespace-after-where-clause.struct.html
+++ b/tests/rustdoc/whitespace-after-where-clause.struct.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub struct Struct&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+<pre class="rust item-decl"><code>pub struct Struct&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
pub a: <a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>,
pub b: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>,
}</code></pre> \ 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 0928b48e6..0e25ed86a 100644
--- a/tests/rustdoc/whitespace-after-where-clause.trait.html
+++ b/tests/rustdoc/whitespace-after-where-clause.trait.html
@@ -1,5 +1,5 @@
-<pre class="rust item-decl"><code>pub trait ToOwned&lt;T&gt;<span class="where fmt-newline">where
- T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</span>{
+<pre class="rust item-decl"><code>pub trait ToOwned&lt;T&gt;<div class="where">where
+ T: <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>,</div>{
type <a href="#associatedtype.Owned" class="associatedtype">Owned</a>;
// Required methods
diff --git a/tests/rustdoc/whitespace-after-where-clause.union.html b/tests/rustdoc/whitespace-after-where-clause.union.html
index 40b0c6712..e63374760 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union.html
@@ -1,4 +1,4 @@
-<pre class="rust item-decl"><code>pub union Union&lt;'a, B&gt;<span class="where fmt-newline">where
- B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
- /* private fields */
+<pre class="rust item-decl"><code>pub union Union&lt;'a, B&gt;<div class="where">where
+ B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</div>{
+ <span class="comment">/* private fields */</span>
}</code></pre> \ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.union2.html b/tests/rustdoc/whitespace-after-where-clause.union2.html
index 177a161b8..da984343d 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union2.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union2.html
@@ -1,3 +1,3 @@
<pre class="rust item-decl"><code>pub union Union2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + 'a&gt; {
- /* private fields */
+ <span class="comment">/* private fields */</span>
}</code></pre> \ No newline at end of file