From 4486c24db3ca1c698b34ea08bee15194774b53df Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 21 May 2024 12:28:30 -0700 Subject: [PATCH 1/3] Add URL and crate_name to test cases --- tests/rustdoc/issue-80233-normalize-auto-trait.rs | 4 +++- .../issue-81141-private-reexport-in-public-api-2.rs | 1 + ...ssue-81141-private-reexport-in-public-api-generics.rs | 1 + .../issue-81141-private-reexport-in-public-api-hidden.rs | 1 + ...issue-81141-private-reexport-in-public-api-private.rs | 1 + .../issue-81141-private-reexport-in-public-api.rs | 1 + tests/rustdoc/issue-82465-asref-for-and-of-local.rs | 5 ++++- ...375-multiple-mods-w-same-name-doc-inline-last-item.rs | 1 + .../issue-83375-multiple-mods-w-same-name-doc-inline.rs | 1 + tests/rustdoc/issue-85454.rs | 1 + tests/rustdoc/issue-86620.rs | 6 ++++-- tests/rustdoc/issue-88600.rs | 4 +++- tests/rustdoc/issue-89309-heading-levels.rs | 1 + tests/rustdoc/issue-89852.rs | 6 ++++-- .../rustdoc/issue-94183-blanket-impl-reexported-trait.rs | 1 + tests/rustdoc/issue-95633.rs | 1 + tests/rustdoc/issue-95873.rs | 5 ++++- tests/rustdoc/issue-96381.rs | 1 + tests/rustdoc/issue-98697.rs | 9 +++++---- ...e-99221-multiple-macro-rules-w-same-name-submodule.rs | 1 + 20 files changed, 40 insertions(+), 12 deletions(-) diff --git a/tests/rustdoc/issue-80233-normalize-auto-trait.rs b/tests/rustdoc/issue-80233-normalize-auto-trait.rs index 62fbc2444dbc2..0649801863077 100644 --- a/tests/rustdoc/issue-80233-normalize-auto-trait.rs +++ b/tests/rustdoc/issue-80233-normalize-auto-trait.rs @@ -1,7 +1,9 @@ // Regression test for issue #80233 // Tests that we don't ICE when processing auto traits +// https://github.com/rust-lang/rust/issues/80233 #![crate_type = "lib"] +#![crate_name = "foo"] pub trait Trait1 {} pub trait Trait2 { @@ -30,7 +32,7 @@ impl Trait3 for Vec { pub struct Struct1 {} -// @has issue_80233_normalize_auto_trait/struct.Question.html +// @has foo/struct.Question.html // @has - '//h3[@class="code-header"]' 'impl Send for Question' pub struct Question { pub ins: < as Trait3>::Type3 as Trait2>::Type2, diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs index fba310cec6d6b..c066f54b32b20 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs @@ -1,5 +1,6 @@ //@ edition:2015 +// https://github.com/rust-lang/rust/issues/81141 #![crate_name = "foo"] use external::Public as Private; diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs index 7e289508628f5..1c86c769a124f 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/81141 #![crate_name = "foo"] use crate::bar::Foo as Alias; diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs index 388f69ba3265a..7d6fadf26e2f2 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs @@ -1,5 +1,6 @@ //@ compile-flags: -Z unstable-options --document-hidden-items +// https://github.com/rust-lang/rust/issues/81141 #![crate_name = "foo"] #[doc(hidden)] diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs index 2633f98c4f303..6bf507838d55d 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs @@ -1,5 +1,6 @@ //@ compile-flags: --document-private-items +// https://github.com/rust-lang/rust/issues/81141 #![crate_name = "foo"] use crate::bar::Bar as Alias; diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs b/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs index bd54d02c6ec8f..d695ed7fbfac2 100644 --- a/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs +++ b/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs @@ -1,6 +1,7 @@ // This test ensures that if a private re-export is present in a public API, it'll be // replaced by the first public item in the re-export chain or by the private item. +// https://github.com/rust-lang/rust/issues/81141 #![crate_name = "foo"] use crate::bar::Bar as Alias; diff --git a/tests/rustdoc/issue-82465-asref-for-and-of-local.rs b/tests/rustdoc/issue-82465-asref-for-and-of-local.rs index adf4d111a6cb9..e620468890435 100644 --- a/tests/rustdoc/issue-82465-asref-for-and-of-local.rs +++ b/tests/rustdoc/issue-82465-asref-for-and-of-local.rs @@ -1,7 +1,10 @@ +// https://github.com/rust-lang/rust/issues/82465 +#![crate_name = "foo"] + use std::convert::AsRef; pub struct Local; -// @has issue_82465_asref_for_and_of_local/struct.Local.html '//h3[@class="code-header"]' 'impl AsRef for Local' +// @has foo/struct.Local.html '//h3[@class="code-header"]' 'impl AsRef for Local' impl AsRef for Local { fn as_ref(&self) -> &str { todo!() diff --git a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs b/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs index 9bce25846d858..7bad825b35fe4 100644 --- a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs +++ b/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/83375 #![crate_name = "foo"] pub mod sub { diff --git a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs b/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs index d0960dfef4362..9b3dfd45370b1 100644 --- a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs +++ b/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/83375 #![crate_name = "foo"] pub mod sub { diff --git a/tests/rustdoc/issue-85454.rs b/tests/rustdoc/issue-85454.rs index 790db0c5dcfef..de806db77094d 100644 --- a/tests/rustdoc/issue-85454.rs +++ b/tests/rustdoc/issue-85454.rs @@ -1,6 +1,7 @@ //@ aux-build:issue-85454.rs //@ build-aux-docs #![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/85454 extern crate issue_85454; diff --git a/tests/rustdoc/issue-86620.rs b/tests/rustdoc/issue-86620.rs index a7ac0f1d291b8..537dadd212419 100644 --- a/tests/rustdoc/issue-86620.rs +++ b/tests/rustdoc/issue-86620.rs @@ -1,9 +1,11 @@ //@ aux-build:issue-86620-1.rs +#![crate_name = "foo"] +// https://github.com/rust-lang/rust/issues/86620 extern crate issue_86620_1; use issue_86620_1::*; -// @!has issue_86620/struct.S.html '//*[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip -// @has issue_86620/struct.S.html '//*[@id="method.vzip"]//a[@class="anchor"]/@href' #method.vzip +// @!has foo/struct.S.html '//*[@id="method.vzip"]//a[@class="fnname"]/@href' #tymethod.vzip +// @has foo/struct.S.html '//*[@id="method.vzip"]//a[@class="anchor"]/@href' #method.vzip pub struct S; diff --git a/tests/rustdoc/issue-88600.rs b/tests/rustdoc/issue-88600.rs index f89af472f6e42..31d96e9db758b 100644 --- a/tests/rustdoc/issue-88600.rs +++ b/tests/rustdoc/issue-88600.rs @@ -1,4 +1,6 @@ // This test ensure that #[doc(hidden)] is applied correctly in enum variant fields. +// https://github.com/rust-lang/rust/issues/88600 +#![crate_name = "foo"] // Denotes a field which should be hidden. pub struct H; @@ -6,7 +8,7 @@ pub struct H; // Denotes a field which should not be hidden (shown). pub struct S; -// @has issue_88600/enum.FooEnum.html +// @has foo/enum.FooEnum.html pub enum FooEnum { // @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(/* private fields */)' // @count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0 diff --git a/tests/rustdoc/issue-89309-heading-levels.rs b/tests/rustdoc/issue-89309-heading-levels.rs index bb706c28ffa51..caa994285252f 100644 --- a/tests/rustdoc/issue-89309-heading-levels.rs +++ b/tests/rustdoc/issue-89309-heading-levels.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/89309 #![crate_name = "foo"] // @has foo/trait.Read.html diff --git a/tests/rustdoc/issue-89852.rs b/tests/rustdoc/issue-89852.rs index e9b3d80c92ee8..cffe1289ce823 100644 --- a/tests/rustdoc/issue-89852.rs +++ b/tests/rustdoc/issue-89852.rs @@ -1,10 +1,12 @@ //@ edition:2018 +// https://github.com/rust-lang/rust/issues/89852 +#![crate_name = "foo"] #![no_core] #![feature(no_core)] -// @matchesraw 'issue_89852/sidebar-items.js' '"repro"' -// @!matchesraw 'issue_89852/sidebar-items.js' '"repro".*"repro"' +// @matchesraw 'foo/sidebar-items.js' '"repro"' +// @!matchesraw 'foo/sidebar-items.js' '"repro".*"repro"' #[macro_export] macro_rules! repro { diff --git a/tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs b/tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs index 95ddd4c74715a..343e030da9e2b 100644 --- a/tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs +++ b/tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs @@ -2,6 +2,7 @@ // This test ensures that a publicly re-exported private trait will // appear in the blanket impl list. +// https://github.com/rust-lang/rust/issues/94183 #![crate_name = "foo"] // @has 'foo/struct.S.html' diff --git a/tests/rustdoc/issue-95633.rs b/tests/rustdoc/issue-95633.rs index 5695ef579f2b5..7f612a0b60ae4 100644 --- a/tests/rustdoc/issue-95633.rs +++ b/tests/rustdoc/issue-95633.rs @@ -1,6 +1,7 @@ //@ compile-flags: --document-private-items // This ensures that no ICE is triggered when rustdoc is run on this code. +// https://github.com/rust-lang/rust/issues/95633 mod stdlib { pub (crate) use std::i8; diff --git a/tests/rustdoc/issue-95873.rs b/tests/rustdoc/issue-95873.rs index 83f1f2f75bf02..5a817fb3409e9 100644 --- a/tests/rustdoc/issue-95873.rs +++ b/tests/rustdoc/issue-95873.rs @@ -1,2 +1,5 @@ -// @has issue_95873/index.html "//*[@class='item-name']" "pub use ::std as x;" +// https://github.com/rust-lang/rust/issues/95873 +#![crate_name = "foo"] + +// @has foo/index.html "//*[@class='item-name']" "pub use ::std as x;" pub use ::std as x; diff --git a/tests/rustdoc/issue-96381.rs b/tests/rustdoc/issue-96381.rs index 90875c076057d..6d6e5e0a8398b 100644 --- a/tests/rustdoc/issue-96381.rs +++ b/tests/rustdoc/issue-96381.rs @@ -1,4 +1,5 @@ //@ should-fail +// https://github.com/rust-lang/rust/issues/96381 #![allow(unused)] diff --git a/tests/rustdoc/issue-98697.rs b/tests/rustdoc/issue-98697.rs index df9f291511134..545af512d3d02 100644 --- a/tests/rustdoc/issue-98697.rs +++ b/tests/rustdoc/issue-98697.rs @@ -1,5 +1,6 @@ //@ aux-build:issue-98697-reexport-with-anonymous-lifetime.rs //@ ignore-cross-compile +#![crate_name = "foo"] // When reexporting a function with a HRTB with anonymous lifetimes, // make sure the anonymous lifetimes are not rendered. @@ -8,10 +9,10 @@ extern crate issue_98697_reexport_with_anonymous_lifetime; -// @has issue_98697/fn.repro.html '//pre[@class="rust item-decl"]/code' 'fn repro()where F: Fn(&str)' -// @!has issue_98697/fn.repro.html '//pre[@class="rust item-decl"]/code' 'for<' +// @has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'fn repro()where F: Fn(&str)' +// @!has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'for<' pub use issue_98697_reexport_with_anonymous_lifetime::repro; -// @has issue_98697/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra' -// @!has issue_98697/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<' +// @has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra' +// @!has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<' pub use issue_98697_reexport_with_anonymous_lifetime::Extra; diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs index d3ccd1c069b6e..ed1e42c1f4eeb 100644 --- a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs +++ b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/99221 #![crate_name = "foo"] #[macro_use] From 55bd054a21533cbaa02836b0ca125c2eaaa4b8f4 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 21 May 2024 12:28:34 -0700 Subject: [PATCH 2/3] rustdoc: rename `issue-\d+.rs` tests to have meaningful names --- ...-asref-for-and-of-local.rs => asref-for-and-of-local-82465.rs} | 0 ...reexported-trait.rs => blanket-impl-reexported-trait-94183.rs} | 0 .../{issue-88600.rs => enum-variant-doc-hidden-field-88600.rs} | 0 .../{issue-89309-heading-levels.rs => heading-levels-89309.rs} | 0 .../{issue-86620.rs => method-anchor-in-blanket-impl-86620.rs} | 0 ...ule.rs => multiple-macro-rules-w-same-name-submodule-99221.rs} | 0 ...oc-inline.rs => multiple-mods-w-same-name-doc-inline-83375.rs} | 0 ...rs => multiple-mods-w-same-name-doc-inline-last-item-83375.rs} | 0 ...0233-normalize-auto-trait.rs => normalize-auto-trait-80233.rs} | 0 ...ort-in-public-api.rs => private-export-in-public-api-81141.rs} | 0 ...-public-api-2.rs => private-reexport-in-public-api-81141-2.rs} | 0 ...nerics.rs => private-reexport-in-public-api-generics-81141.rs} | 0 ...i-hidden.rs => private-reexport-in-public-api-hidden-81141.rs} | 0 ...private.rs => private-reexport-in-public-api-private-81141.rs} | 0 tests/rustdoc/{issue-89852.rs => pub-use-exported-macro-89852.rs} | 0 ...95633.rs => pub-use-primitive-document-private-items-95633.rs} | 0 tests/rustdoc/{issue-95873.rs => pub-use-root-path-95873.rs} | 0 tests/rustdoc/{issue-85454.rs => qpath-self-85454.rs} | 0 .../{issue-98697.rs => reexport-with-anonymous-lifetime-98697.rs} | 0 .../{issue-96381.rs => underscore-type-in-trait-impl-96381.rs} | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename tests/rustdoc/{issue-82465-asref-for-and-of-local.rs => asref-for-and-of-local-82465.rs} (100%) rename tests/rustdoc/{issue-94183-blanket-impl-reexported-trait.rs => blanket-impl-reexported-trait-94183.rs} (100%) rename tests/rustdoc/{issue-88600.rs => enum-variant-doc-hidden-field-88600.rs} (100%) rename tests/rustdoc/{issue-89309-heading-levels.rs => heading-levels-89309.rs} (100%) rename tests/rustdoc/{issue-86620.rs => method-anchor-in-blanket-impl-86620.rs} (100%) rename tests/rustdoc/{issue-99221-multiple-macro-rules-w-same-name-submodule.rs => multiple-macro-rules-w-same-name-submodule-99221.rs} (100%) rename tests/rustdoc/{issue-83375-multiple-mods-w-same-name-doc-inline.rs => multiple-mods-w-same-name-doc-inline-83375.rs} (100%) rename tests/rustdoc/{issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs => multiple-mods-w-same-name-doc-inline-last-item-83375.rs} (100%) rename tests/rustdoc/{issue-80233-normalize-auto-trait.rs => normalize-auto-trait-80233.rs} (100%) rename tests/rustdoc/{issue-81141-private-reexport-in-public-api.rs => private-export-in-public-api-81141.rs} (100%) rename tests/rustdoc/{issue-81141-private-reexport-in-public-api-2.rs => private-reexport-in-public-api-81141-2.rs} (100%) rename tests/rustdoc/{issue-81141-private-reexport-in-public-api-generics.rs => private-reexport-in-public-api-generics-81141.rs} (100%) rename tests/rustdoc/{issue-81141-private-reexport-in-public-api-hidden.rs => private-reexport-in-public-api-hidden-81141.rs} (100%) rename tests/rustdoc/{issue-81141-private-reexport-in-public-api-private.rs => private-reexport-in-public-api-private-81141.rs} (100%) rename tests/rustdoc/{issue-89852.rs => pub-use-exported-macro-89852.rs} (100%) rename tests/rustdoc/{issue-95633.rs => pub-use-primitive-document-private-items-95633.rs} (100%) rename tests/rustdoc/{issue-95873.rs => pub-use-root-path-95873.rs} (100%) rename tests/rustdoc/{issue-85454.rs => qpath-self-85454.rs} (100%) rename tests/rustdoc/{issue-98697.rs => reexport-with-anonymous-lifetime-98697.rs} (100%) rename tests/rustdoc/{issue-96381.rs => underscore-type-in-trait-impl-96381.rs} (100%) diff --git a/tests/rustdoc/issue-82465-asref-for-and-of-local.rs b/tests/rustdoc/asref-for-and-of-local-82465.rs similarity index 100% rename from tests/rustdoc/issue-82465-asref-for-and-of-local.rs rename to tests/rustdoc/asref-for-and-of-local-82465.rs diff --git a/tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs b/tests/rustdoc/blanket-impl-reexported-trait-94183.rs similarity index 100% rename from tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs rename to tests/rustdoc/blanket-impl-reexported-trait-94183.rs diff --git a/tests/rustdoc/issue-88600.rs b/tests/rustdoc/enum-variant-doc-hidden-field-88600.rs similarity index 100% rename from tests/rustdoc/issue-88600.rs rename to tests/rustdoc/enum-variant-doc-hidden-field-88600.rs diff --git a/tests/rustdoc/issue-89309-heading-levels.rs b/tests/rustdoc/heading-levels-89309.rs similarity index 100% rename from tests/rustdoc/issue-89309-heading-levels.rs rename to tests/rustdoc/heading-levels-89309.rs diff --git a/tests/rustdoc/issue-86620.rs b/tests/rustdoc/method-anchor-in-blanket-impl-86620.rs similarity index 100% rename from tests/rustdoc/issue-86620.rs rename to tests/rustdoc/method-anchor-in-blanket-impl-86620.rs diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs b/tests/rustdoc/multiple-macro-rules-w-same-name-submodule-99221.rs similarity index 100% rename from tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name-submodule.rs rename to tests/rustdoc/multiple-macro-rules-w-same-name-submodule-99221.rs diff --git a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs b/tests/rustdoc/multiple-mods-w-same-name-doc-inline-83375.rs similarity index 100% rename from tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline.rs rename to tests/rustdoc/multiple-mods-w-same-name-doc-inline-83375.rs diff --git a/tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs b/tests/rustdoc/multiple-mods-w-same-name-doc-inline-last-item-83375.rs similarity index 100% rename from tests/rustdoc/issue-83375-multiple-mods-w-same-name-doc-inline-last-item.rs rename to tests/rustdoc/multiple-mods-w-same-name-doc-inline-last-item-83375.rs diff --git a/tests/rustdoc/issue-80233-normalize-auto-trait.rs b/tests/rustdoc/normalize-auto-trait-80233.rs similarity index 100% rename from tests/rustdoc/issue-80233-normalize-auto-trait.rs rename to tests/rustdoc/normalize-auto-trait-80233.rs diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api.rs b/tests/rustdoc/private-export-in-public-api-81141.rs similarity index 100% rename from tests/rustdoc/issue-81141-private-reexport-in-public-api.rs rename to tests/rustdoc/private-export-in-public-api-81141.rs diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs b/tests/rustdoc/private-reexport-in-public-api-81141-2.rs similarity index 100% rename from tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs rename to tests/rustdoc/private-reexport-in-public-api-81141-2.rs diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs b/tests/rustdoc/private-reexport-in-public-api-generics-81141.rs similarity index 100% rename from tests/rustdoc/issue-81141-private-reexport-in-public-api-generics.rs rename to tests/rustdoc/private-reexport-in-public-api-generics-81141.rs diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs b/tests/rustdoc/private-reexport-in-public-api-hidden-81141.rs similarity index 100% rename from tests/rustdoc/issue-81141-private-reexport-in-public-api-hidden.rs rename to tests/rustdoc/private-reexport-in-public-api-hidden-81141.rs diff --git a/tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs b/tests/rustdoc/private-reexport-in-public-api-private-81141.rs similarity index 100% rename from tests/rustdoc/issue-81141-private-reexport-in-public-api-private.rs rename to tests/rustdoc/private-reexport-in-public-api-private-81141.rs diff --git a/tests/rustdoc/issue-89852.rs b/tests/rustdoc/pub-use-exported-macro-89852.rs similarity index 100% rename from tests/rustdoc/issue-89852.rs rename to tests/rustdoc/pub-use-exported-macro-89852.rs diff --git a/tests/rustdoc/issue-95633.rs b/tests/rustdoc/pub-use-primitive-document-private-items-95633.rs similarity index 100% rename from tests/rustdoc/issue-95633.rs rename to tests/rustdoc/pub-use-primitive-document-private-items-95633.rs diff --git a/tests/rustdoc/issue-95873.rs b/tests/rustdoc/pub-use-root-path-95873.rs similarity index 100% rename from tests/rustdoc/issue-95873.rs rename to tests/rustdoc/pub-use-root-path-95873.rs diff --git a/tests/rustdoc/issue-85454.rs b/tests/rustdoc/qpath-self-85454.rs similarity index 100% rename from tests/rustdoc/issue-85454.rs rename to tests/rustdoc/qpath-self-85454.rs diff --git a/tests/rustdoc/issue-98697.rs b/tests/rustdoc/reexport-with-anonymous-lifetime-98697.rs similarity index 100% rename from tests/rustdoc/issue-98697.rs rename to tests/rustdoc/reexport-with-anonymous-lifetime-98697.rs diff --git a/tests/rustdoc/issue-96381.rs b/tests/rustdoc/underscore-type-in-trait-impl-96381.rs similarity index 100% rename from tests/rustdoc/issue-96381.rs rename to tests/rustdoc/underscore-type-in-trait-impl-96381.rs From b5923a95a886588fd40fccd69f1ccca504234194 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Tue, 21 May 2024 21:21:26 -0700 Subject: [PATCH 3/3] Move tests into appropriate subdirectories --- .../pub-use-primitive-document-private-items-95633.rs | 1 + tests/rustdoc/{ => inline_cross}/auxiliary/issue-85454.rs | 0 .../auxiliary/reexport-with-anonymous-lifetime-98697.rs} | 0 tests/rustdoc/{ => inline_cross}/qpath-self-85454.rs | 0 .../reexport-with-anonymous-lifetime-98697.rs | 8 ++++---- .../blanket-impl-reexported-trait-94183.rs | 0 .../private-reexport-in-public-api-81141-2.rs | 0 .../private-reexport-in-public-api-81141.rs} | 0 .../private-reexport-in-public-api-generics-81141.rs | 0 .../private-reexport-in-public-api-hidden-81141.rs | 0 .../private-reexport-in-public-api-private-81141.rs | 0 .../reexported-macro-and-macro-export-sidebar-89852.rs} | 0 .../{ => synthetic_auto}/normalize-auto-trait-80233.rs | 0 13 files changed, 5 insertions(+), 4 deletions(-) rename tests/{rustdoc => rustdoc-ui}/pub-use-primitive-document-private-items-95633.rs (93%) rename tests/rustdoc/{ => inline_cross}/auxiliary/issue-85454.rs (100%) rename tests/rustdoc/{auxiliary/issue-98697-reexport-with-anonymous-lifetime.rs => inline_cross/auxiliary/reexport-with-anonymous-lifetime-98697.rs} (100%) rename tests/rustdoc/{ => inline_cross}/qpath-self-85454.rs (100%) rename tests/rustdoc/{ => inline_cross}/reexport-with-anonymous-lifetime-98697.rs (72%) rename tests/rustdoc/{ => inline_local}/blanket-impl-reexported-trait-94183.rs (100%) rename tests/rustdoc/{ => inline_local}/private-reexport-in-public-api-81141-2.rs (100%) rename tests/rustdoc/{private-export-in-public-api-81141.rs => inline_local/private-reexport-in-public-api-81141.rs} (100%) rename tests/rustdoc/{ => inline_local}/private-reexport-in-public-api-generics-81141.rs (100%) rename tests/rustdoc/{ => inline_local}/private-reexport-in-public-api-hidden-81141.rs (100%) rename tests/rustdoc/{ => inline_local}/private-reexport-in-public-api-private-81141.rs (100%) rename tests/rustdoc/{pub-use-exported-macro-89852.rs => inline_local/reexported-macro-and-macro-export-sidebar-89852.rs} (100%) rename tests/rustdoc/{ => synthetic_auto}/normalize-auto-trait-80233.rs (100%) diff --git a/tests/rustdoc/pub-use-primitive-document-private-items-95633.rs b/tests/rustdoc-ui/pub-use-primitive-document-private-items-95633.rs similarity index 93% rename from tests/rustdoc/pub-use-primitive-document-private-items-95633.rs rename to tests/rustdoc-ui/pub-use-primitive-document-private-items-95633.rs index 7f612a0b60ae4..d53a67cde8b43 100644 --- a/tests/rustdoc/pub-use-primitive-document-private-items-95633.rs +++ b/tests/rustdoc-ui/pub-use-primitive-document-private-items-95633.rs @@ -1,3 +1,4 @@ +//@ check-pass //@ compile-flags: --document-private-items // This ensures that no ICE is triggered when rustdoc is run on this code. diff --git a/tests/rustdoc/auxiliary/issue-85454.rs b/tests/rustdoc/inline_cross/auxiliary/issue-85454.rs similarity index 100% rename from tests/rustdoc/auxiliary/issue-85454.rs rename to tests/rustdoc/inline_cross/auxiliary/issue-85454.rs diff --git a/tests/rustdoc/auxiliary/issue-98697-reexport-with-anonymous-lifetime.rs b/tests/rustdoc/inline_cross/auxiliary/reexport-with-anonymous-lifetime-98697.rs similarity index 100% rename from tests/rustdoc/auxiliary/issue-98697-reexport-with-anonymous-lifetime.rs rename to tests/rustdoc/inline_cross/auxiliary/reexport-with-anonymous-lifetime-98697.rs diff --git a/tests/rustdoc/qpath-self-85454.rs b/tests/rustdoc/inline_cross/qpath-self-85454.rs similarity index 100% rename from tests/rustdoc/qpath-self-85454.rs rename to tests/rustdoc/inline_cross/qpath-self-85454.rs diff --git a/tests/rustdoc/reexport-with-anonymous-lifetime-98697.rs b/tests/rustdoc/inline_cross/reexport-with-anonymous-lifetime-98697.rs similarity index 72% rename from tests/rustdoc/reexport-with-anonymous-lifetime-98697.rs rename to tests/rustdoc/inline_cross/reexport-with-anonymous-lifetime-98697.rs index 545af512d3d02..fe6e5a39c8106 100644 --- a/tests/rustdoc/reexport-with-anonymous-lifetime-98697.rs +++ b/tests/rustdoc/inline_cross/reexport-with-anonymous-lifetime-98697.rs @@ -1,4 +1,4 @@ -//@ aux-build:issue-98697-reexport-with-anonymous-lifetime.rs +//@ aux-build:reexport-with-anonymous-lifetime-98697.rs //@ ignore-cross-compile #![crate_name = "foo"] @@ -7,12 +7,12 @@ // // https://github.com/rust-lang/rust/issues/98697 -extern crate issue_98697_reexport_with_anonymous_lifetime; +extern crate reexport_with_anonymous_lifetime_98697; // @has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'fn repro()where F: Fn(&str)' // @!has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'for<' -pub use issue_98697_reexport_with_anonymous_lifetime::repro; +pub use reexport_with_anonymous_lifetime_98697::repro; // @has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra' // @!has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<' -pub use issue_98697_reexport_with_anonymous_lifetime::Extra; +pub use reexport_with_anonymous_lifetime_98697::Extra; diff --git a/tests/rustdoc/blanket-impl-reexported-trait-94183.rs b/tests/rustdoc/inline_local/blanket-impl-reexported-trait-94183.rs similarity index 100% rename from tests/rustdoc/blanket-impl-reexported-trait-94183.rs rename to tests/rustdoc/inline_local/blanket-impl-reexported-trait-94183.rs diff --git a/tests/rustdoc/private-reexport-in-public-api-81141-2.rs b/tests/rustdoc/inline_local/private-reexport-in-public-api-81141-2.rs similarity index 100% rename from tests/rustdoc/private-reexport-in-public-api-81141-2.rs rename to tests/rustdoc/inline_local/private-reexport-in-public-api-81141-2.rs diff --git a/tests/rustdoc/private-export-in-public-api-81141.rs b/tests/rustdoc/inline_local/private-reexport-in-public-api-81141.rs similarity index 100% rename from tests/rustdoc/private-export-in-public-api-81141.rs rename to tests/rustdoc/inline_local/private-reexport-in-public-api-81141.rs diff --git a/tests/rustdoc/private-reexport-in-public-api-generics-81141.rs b/tests/rustdoc/inline_local/private-reexport-in-public-api-generics-81141.rs similarity index 100% rename from tests/rustdoc/private-reexport-in-public-api-generics-81141.rs rename to tests/rustdoc/inline_local/private-reexport-in-public-api-generics-81141.rs diff --git a/tests/rustdoc/private-reexport-in-public-api-hidden-81141.rs b/tests/rustdoc/inline_local/private-reexport-in-public-api-hidden-81141.rs similarity index 100% rename from tests/rustdoc/private-reexport-in-public-api-hidden-81141.rs rename to tests/rustdoc/inline_local/private-reexport-in-public-api-hidden-81141.rs diff --git a/tests/rustdoc/private-reexport-in-public-api-private-81141.rs b/tests/rustdoc/inline_local/private-reexport-in-public-api-private-81141.rs similarity index 100% rename from tests/rustdoc/private-reexport-in-public-api-private-81141.rs rename to tests/rustdoc/inline_local/private-reexport-in-public-api-private-81141.rs diff --git a/tests/rustdoc/pub-use-exported-macro-89852.rs b/tests/rustdoc/inline_local/reexported-macro-and-macro-export-sidebar-89852.rs similarity index 100% rename from tests/rustdoc/pub-use-exported-macro-89852.rs rename to tests/rustdoc/inline_local/reexported-macro-and-macro-export-sidebar-89852.rs diff --git a/tests/rustdoc/normalize-auto-trait-80233.rs b/tests/rustdoc/synthetic_auto/normalize-auto-trait-80233.rs similarity index 100% rename from tests/rustdoc/normalize-auto-trait-80233.rs rename to tests/rustdoc/synthetic_auto/normalize-auto-trait-80233.rs