From 50d38d3d8da3bd00a94446f7707d9632e5cc333c Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 10 Oct 2026 17:56:26 +0200 Subject: [PATCH] More `tests/rustdoc-html` cleanups --- tests/rustdoc-html/README.md | 4 ++++ tests/rustdoc-html/{ => display}/anon-fn-params.rs | 0 tests/rustdoc-html/{ => display}/anonymous-lifetime.rs | 0 tests/rustdoc-html/{ => display}/auxiliary/elided-lifetime.rs | 0 .../{ => display}/auxiliary/ext-anon-fn-params.rs | 0 tests/rustdoc-html/{ => display}/auxiliary/unit-return.rs | 0 tests/rustdoc-html/{ => display}/elided-lifetime.rs | 0 tests/rustdoc-html/{ => display}/heading-levels-89309.rs | 0 tests/rustdoc-html/{ => display}/read-more-unneeded.rs | 0 tests/rustdoc-html/{ => display}/sized_trait.rs | 4 ++-- tests/rustdoc-html/{ => display}/test-strikethrough.rs | 0 tests/rustdoc-html/{ => display}/unit-return.rs | 0 tests/rustdoc-html/{ => display}/variadic.rs | 0 tests/rustdoc-html/{ => display}/where-clause-order.rs | 0 tests/rustdoc-html/{ => display}/where-sized.rs | 0 tests/rustdoc-html/{ => display}/wrapping.rs | 0 tests/rustdoc-html/{ => doc-cfg}/feature-gate-doc_auto_cfg.rs | 0 tests/rustdoc-html/{ => hidden}/hidden-trait-methods.rs | 0 tests/rustdoc-html/{ => intra-doc}/doc-on-keyword.rs | 0 tests/rustdoc-html/{ => sidebar}/fn-sidebar.rs | 0 tests/rustdoc-html/{ => struct}/struct-arg-pattern.rs | 0 tests/rustdoc-html/{ => struct}/struct-field.rs | 0 tests/rustdoc-html/{ => struct}/structfields.rs | 0 23 files changed, 6 insertions(+), 2 deletions(-) rename tests/rustdoc-html/{ => display}/anon-fn-params.rs (100%) rename tests/rustdoc-html/{ => display}/anonymous-lifetime.rs (100%) rename tests/rustdoc-html/{ => display}/auxiliary/elided-lifetime.rs (100%) rename tests/rustdoc-html/{ => display}/auxiliary/ext-anon-fn-params.rs (100%) rename tests/rustdoc-html/{ => display}/auxiliary/unit-return.rs (100%) rename tests/rustdoc-html/{ => display}/elided-lifetime.rs (100%) rename tests/rustdoc-html/{ => display}/heading-levels-89309.rs (100%) rename tests/rustdoc-html/{ => display}/read-more-unneeded.rs (100%) rename tests/rustdoc-html/{ => display}/sized_trait.rs (71%) rename tests/rustdoc-html/{ => display}/test-strikethrough.rs (100%) rename tests/rustdoc-html/{ => display}/unit-return.rs (100%) rename tests/rustdoc-html/{ => display}/variadic.rs (100%) rename tests/rustdoc-html/{ => display}/where-clause-order.rs (100%) rename tests/rustdoc-html/{ => display}/where-sized.rs (100%) rename tests/rustdoc-html/{ => display}/wrapping.rs (100%) rename tests/rustdoc-html/{ => doc-cfg}/feature-gate-doc_auto_cfg.rs (100%) rename tests/rustdoc-html/{ => hidden}/hidden-trait-methods.rs (100%) rename tests/rustdoc-html/{ => intra-doc}/doc-on-keyword.rs (100%) rename tests/rustdoc-html/{ => sidebar}/fn-sidebar.rs (100%) rename tests/rustdoc-html/{ => struct}/struct-arg-pattern.rs (100%) rename tests/rustdoc-html/{ => struct}/struct-field.rs (100%) rename tests/rustdoc-html/{ => struct}/structfields.rs (100%) diff --git a/tests/rustdoc-html/README.md b/tests/rustdoc-html/README.md index 055c03b1eed..9ac5e8c36fd 100644 --- a/tests/rustdoc-html/README.md +++ b/tests/rustdoc-html/README.md @@ -144,6 +144,10 @@ page, etc. Contains tests checking the content of the source code pages (when you click on the `source` links). +## `tests/rustdoc-html/struct` + +Same as `tests/rustdoc-html/enum` but for struct items. + ## `tests/rustdoc-html/synthetic_auto` Somewhat equivalent to the `auto` folder's tests. Both should likely be merged. diff --git a/tests/rustdoc-html/anon-fn-params.rs b/tests/rustdoc-html/display/anon-fn-params.rs similarity index 100% rename from tests/rustdoc-html/anon-fn-params.rs rename to tests/rustdoc-html/display/anon-fn-params.rs diff --git a/tests/rustdoc-html/anonymous-lifetime.rs b/tests/rustdoc-html/display/anonymous-lifetime.rs similarity index 100% rename from tests/rustdoc-html/anonymous-lifetime.rs rename to tests/rustdoc-html/display/anonymous-lifetime.rs diff --git a/tests/rustdoc-html/auxiliary/elided-lifetime.rs b/tests/rustdoc-html/display/auxiliary/elided-lifetime.rs similarity index 100% rename from tests/rustdoc-html/auxiliary/elided-lifetime.rs rename to tests/rustdoc-html/display/auxiliary/elided-lifetime.rs diff --git a/tests/rustdoc-html/auxiliary/ext-anon-fn-params.rs b/tests/rustdoc-html/display/auxiliary/ext-anon-fn-params.rs similarity index 100% rename from tests/rustdoc-html/auxiliary/ext-anon-fn-params.rs rename to tests/rustdoc-html/display/auxiliary/ext-anon-fn-params.rs diff --git a/tests/rustdoc-html/auxiliary/unit-return.rs b/tests/rustdoc-html/display/auxiliary/unit-return.rs similarity index 100% rename from tests/rustdoc-html/auxiliary/unit-return.rs rename to tests/rustdoc-html/display/auxiliary/unit-return.rs diff --git a/tests/rustdoc-html/elided-lifetime.rs b/tests/rustdoc-html/display/elided-lifetime.rs similarity index 100% rename from tests/rustdoc-html/elided-lifetime.rs rename to tests/rustdoc-html/display/elided-lifetime.rs diff --git a/tests/rustdoc-html/heading-levels-89309.rs b/tests/rustdoc-html/display/heading-levels-89309.rs similarity index 100% rename from tests/rustdoc-html/heading-levels-89309.rs rename to tests/rustdoc-html/display/heading-levels-89309.rs diff --git a/tests/rustdoc-html/read-more-unneeded.rs b/tests/rustdoc-html/display/read-more-unneeded.rs similarity index 100% rename from tests/rustdoc-html/read-more-unneeded.rs rename to tests/rustdoc-html/display/read-more-unneeded.rs diff --git a/tests/rustdoc-html/sized_trait.rs b/tests/rustdoc-html/display/sized_trait.rs similarity index 71% rename from tests/rustdoc-html/sized_trait.rs rename to tests/rustdoc-html/display/sized_trait.rs index 4df62fdc081..81deb16676e 100644 --- a/tests/rustdoc-html/sized_trait.rs +++ b/tests/rustdoc-html/display/sized_trait.rs @@ -1,13 +1,13 @@ #![crate_name = "foo"] //@ has foo/struct.Bar.html -//@ !has - '//*[@id="impl-Sized"]' '' +//@ !has - '//h3[@class="code-header"]' 'impl Sized for Bar' pub struct Bar { a: u16, } //@ has foo/struct.Foo.html -//@ !has - '//*[@id="impl-Sized"]' '' +//@ !has - '//h3[@class="code-header"]' 'impl Sized for Foo' pub struct Foo(T); //@ has foo/struct.Unsized.html diff --git a/tests/rustdoc-html/test-strikethrough.rs b/tests/rustdoc-html/display/test-strikethrough.rs similarity index 100% rename from tests/rustdoc-html/test-strikethrough.rs rename to tests/rustdoc-html/display/test-strikethrough.rs diff --git a/tests/rustdoc-html/unit-return.rs b/tests/rustdoc-html/display/unit-return.rs similarity index 100% rename from tests/rustdoc-html/unit-return.rs rename to tests/rustdoc-html/display/unit-return.rs diff --git a/tests/rustdoc-html/variadic.rs b/tests/rustdoc-html/display/variadic.rs similarity index 100% rename from tests/rustdoc-html/variadic.rs rename to tests/rustdoc-html/display/variadic.rs diff --git a/tests/rustdoc-html/where-clause-order.rs b/tests/rustdoc-html/display/where-clause-order.rs similarity index 100% rename from tests/rustdoc-html/where-clause-order.rs rename to tests/rustdoc-html/display/where-clause-order.rs diff --git a/tests/rustdoc-html/where-sized.rs b/tests/rustdoc-html/display/where-sized.rs similarity index 100% rename from tests/rustdoc-html/where-sized.rs rename to tests/rustdoc-html/display/where-sized.rs diff --git a/tests/rustdoc-html/wrapping.rs b/tests/rustdoc-html/display/wrapping.rs similarity index 100% rename from tests/rustdoc-html/wrapping.rs rename to tests/rustdoc-html/display/wrapping.rs diff --git a/tests/rustdoc-html/feature-gate-doc_auto_cfg.rs b/tests/rustdoc-html/doc-cfg/feature-gate-doc_auto_cfg.rs similarity index 100% rename from tests/rustdoc-html/feature-gate-doc_auto_cfg.rs rename to tests/rustdoc-html/doc-cfg/feature-gate-doc_auto_cfg.rs diff --git a/tests/rustdoc-html/hidden-trait-methods.rs b/tests/rustdoc-html/hidden/hidden-trait-methods.rs similarity index 100% rename from tests/rustdoc-html/hidden-trait-methods.rs rename to tests/rustdoc-html/hidden/hidden-trait-methods.rs diff --git a/tests/rustdoc-html/doc-on-keyword.rs b/tests/rustdoc-html/intra-doc/doc-on-keyword.rs similarity index 100% rename from tests/rustdoc-html/doc-on-keyword.rs rename to tests/rustdoc-html/intra-doc/doc-on-keyword.rs diff --git a/tests/rustdoc-html/fn-sidebar.rs b/tests/rustdoc-html/sidebar/fn-sidebar.rs similarity index 100% rename from tests/rustdoc-html/fn-sidebar.rs rename to tests/rustdoc-html/sidebar/fn-sidebar.rs diff --git a/tests/rustdoc-html/struct-arg-pattern.rs b/tests/rustdoc-html/struct/struct-arg-pattern.rs similarity index 100% rename from tests/rustdoc-html/struct-arg-pattern.rs rename to tests/rustdoc-html/struct/struct-arg-pattern.rs diff --git a/tests/rustdoc-html/struct-field.rs b/tests/rustdoc-html/struct/struct-field.rs similarity index 100% rename from tests/rustdoc-html/struct-field.rs rename to tests/rustdoc-html/struct/struct-field.rs diff --git a/tests/rustdoc-html/structfields.rs b/tests/rustdoc-html/struct/structfields.rs similarity index 100% rename from tests/rustdoc-html/structfields.rs rename to tests/rustdoc-html/struct/structfields.rs