From 4d35754c46b4e0183770f4d7272b0e70a6553b19 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 12 Jul 2024 17:36:21 -0700 Subject: [PATCH 1/3] Add URL and crate_name to test cases --- .../issue-100204-inline-impl-through-glob-import.rs | 1 + tests/rustdoc/issue-100241.rs | 2 ++ tests/rustdoc/issue-100620.rs | 2 ++ tests/rustdoc/issue-102154.rs | 2 ++ tests/rustdoc/issue-105735-overlapping-reexport-2.rs | 1 + tests/rustdoc/issue-105735-overlapping-reexport.rs | 1 + tests/rustdoc/issue-105952.rs | 1 + tests/rustdoc/issue-106142.rs | 7 +++++-- tests/rustdoc/issue-106421-not-internal.rs | 5 ++++- tests/rustdoc/issue-106421.rs | 4 +++- .../issue-99221-multiple-macro-rules-w-same-name.rs | 1 + tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs | 1 + tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs | 1 + tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs | 1 + 14 files changed, 26 insertions(+), 4 deletions(-) diff --git a/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs b/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs index 7f05e57ec09b0..ba6ed4278716f 100644 --- a/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs +++ b/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/100204 #![crate_name="second"] extern crate first; diff --git a/tests/rustdoc/issue-100241.rs b/tests/rustdoc/issue-100241.rs index e4c613dd2791e..eef4b8355bfd7 100644 --- a/tests/rustdoc/issue-100241.rs +++ b/tests/rustdoc/issue-100241.rs @@ -3,6 +3,8 @@ // Check that this isn't an ICE //@ should-fail +// https://github.com/rust-lang/rust/issues/100241 + mod foo { pub use inner::S; //~^ ERROR unresolved imports `inner`, `foo::S` diff --git a/tests/rustdoc/issue-100620.rs b/tests/rustdoc/issue-100620.rs index 097666eb515d1..39d70bab29e4a 100644 --- a/tests/rustdoc/issue-100620.rs +++ b/tests/rustdoc/issue-100620.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/100620 + pub trait Bar {} pub trait Qux {} diff --git a/tests/rustdoc/issue-102154.rs b/tests/rustdoc/issue-102154.rs index b36f270806ff3..58cabe769272b 100644 --- a/tests/rustdoc/issue-102154.rs +++ b/tests/rustdoc/issue-102154.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/102154 + trait A { type B; } diff --git a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs index 946184c5a0476..9f823ec5923cd 100644 --- a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs +++ b/tests/rustdoc/issue-105735-overlapping-reexport-2.rs @@ -1,4 +1,5 @@ // Regression test to ensure that both `AtomicU8` items are displayed but not the re-export. +// https://github.com/rust-lang/rust/issues/105735 #![crate_name = "foo"] #![no_std] diff --git a/tests/rustdoc/issue-105735-overlapping-reexport.rs b/tests/rustdoc/issue-105735-overlapping-reexport.rs index 0fd17fd9577c2..2a2d0fa98309e 100644 --- a/tests/rustdoc/issue-105735-overlapping-reexport.rs +++ b/tests/rustdoc/issue-105735-overlapping-reexport.rs @@ -1,4 +1,5 @@ // Regression test to ensure that both `AtomicU8` items are displayed but not the re-export. +// https://github.com/rust-lang/rust/issues/105735 #![crate_name = "foo"] #![no_std] diff --git a/tests/rustdoc/issue-105952.rs b/tests/rustdoc/issue-105952.rs index 173efb82f4b98..1bcdfac734290 100644 --- a/tests/rustdoc/issue-105952.rs +++ b/tests/rustdoc/issue-105952.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/105952 #![crate_name = "foo"] #![feature(associated_const_equality)] diff --git a/tests/rustdoc/issue-106142.rs b/tests/rustdoc/issue-106142.rs index 52adc5dbbf1a1..0d146a3c5cd0c 100644 --- a/tests/rustdoc/issue-106142.rs +++ b/tests/rustdoc/issue-106142.rs @@ -1,5 +1,8 @@ -//@ has 'issue_106142/a/index.html' -//@ count 'issue_106142/a/index.html' '//ul[@class="item-table"]//li//a' 1 +// https://github.com/rust-lang/rust/issues/106142 +#![crate_name="foo"] + +//@ has 'foo/a/index.html' +//@ count 'foo/a/index.html' '//ul[@class="item-table"]//li//a' 1 #![allow(rustdoc::broken_intra_doc_links)] diff --git a/tests/rustdoc/issue-106421-not-internal.rs b/tests/rustdoc/issue-106421-not-internal.rs index f328a1036ebe9..a85cfa78cdcda 100644 --- a/tests/rustdoc/issue-106421-not-internal.rs +++ b/tests/rustdoc/issue-106421-not-internal.rs @@ -2,7 +2,10 @@ //@ ignore-cross-compile // This is the version where a non-compiler-internal crate inlines a compiler-internal one. // In this case, the item shouldn't be documented, because regular users can't get at it. +// https://github.com/rust-lang/rust/issues/106421 +#![crate_name="bar"] + extern crate foo; -//@ !has issue_106421_not_internal/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' +//@ !has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' pub use foo::FatalError; diff --git a/tests/rustdoc/issue-106421.rs b/tests/rustdoc/issue-106421.rs index c2064c7109078..aa88a569aef2f 100644 --- a/tests/rustdoc/issue-106421.rs +++ b/tests/rustdoc/issue-106421.rs @@ -1,8 +1,10 @@ //@ aux-build:issue-106421-force-unstable.rs //@ ignore-cross-compile //@ compile-flags: -Zforce-unstable-if-unmarked +// https://github.com/rust-lang/rust/issues/106421 +#![crate_name="bar"] extern crate foo; -//@ has issue_106421/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' +//@ has bar/struct.FatalError.html '//*[@id="method.raise"]' 'fn raise' pub use foo::FatalError; diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs index e7fb4fb3f0ea3..4a1798a849691 100644 --- a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs +++ b/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/99221 #![crate_name = "foo"] #[macro_use] diff --git a/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs b/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs index 8758342fe0736..4c2f77fec23d7 100644 --- a/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs +++ b/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/99221 #![crate_name = "foo"] #[macro_use] diff --git a/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs b/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs index d7c4f1db320c7..60a2aa388ee10 100644 --- a/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs +++ b/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/99734 #![crate_name = "foo"] #[macro_use] diff --git a/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs b/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs index 627cfc0b80b3f..d48464c478f38 100644 --- a/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs +++ b/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs @@ -2,6 +2,7 @@ //@ build-aux-docs //@ ignore-cross-compile +// https://github.com/rust-lang/rust/issues/99734 #![crate_name = "foo"] #[macro_use] From 17419f6499546443fd311cc81a0d44ae233c306f Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 12 Jul 2024 18:12:32 -0700 Subject: [PATCH 2/3] rustdoc: rename `issue-\d+.rs` tests to have meaningful names --- tests/rustdoc/{issue-108281.rs => attributes-inlining-108281.rs} | 0 tests/rustdoc/{issue-101743-bold-tag.rs => bold-tag-101743.rs} | 0 ...ernal.rs => force-unstable-if-unmarked-106421-not-internal.rs} | 0 .../{issue-106421.rs => force-unstable-if-unmarked-106421.rs} | 0 tests/rustdoc/{issue-102154.rs => ice-assoc-type-loop-102154.rs} | 0 .../{issue-105952.rs => ice-associated-const-equality-105952.rs} | 0 tests/rustdoc/{issue-107995.rs => ice-intra-doc-links-107995.rs} | 0 ...issue-100620.rs => ice-method-where-clause-circular-100620.rs} | 0 .../rustdoc/{issue-100241.rs => ice-unresolved-import-100241.rs} | 0 ...h-glob-import.rs => inline-impl-through-glob-import-100204.rs} | 0 .../{issue-108231.rs => macro-export-crate-root-108231.rs} | 0 .../{issue-106142.rs => macro-rules-broken-intra-doc-106142.rs} | 0 ...igns-w-same-name.rs => multiple-foreigns-w-same-name-99734.rs} | 0 ...s-w-same-name.rs => multiple-macro-rules-w-same-name-99221.rs} | 0 ...ple-mods-w-same-name.rs => multiple-mods-w-same-name-99734.rs} | 0 ...ructs-w-same-name.rs => multiple-structs-w-same-name-99221.rs} | 0 ...overlapping-reexport-2.rs => overlapping-reexport-105735-2.rs} | 0 ...735-overlapping-reexport.rs => overlapping-reexport-105735.rs} | 0 tests/rustdoc/{issue-107350.rs => pub-use-loop-107350.rs} | 0 ...679-reexport-of-reexport.rs => reexport-of-reexport-108679.rs} | 0 20 files changed, 0 insertions(+), 0 deletions(-) rename tests/rustdoc/{issue-108281.rs => attributes-inlining-108281.rs} (100%) rename tests/rustdoc/{issue-101743-bold-tag.rs => bold-tag-101743.rs} (100%) rename tests/rustdoc/{issue-106421-not-internal.rs => force-unstable-if-unmarked-106421-not-internal.rs} (100%) rename tests/rustdoc/{issue-106421.rs => force-unstable-if-unmarked-106421.rs} (100%) rename tests/rustdoc/{issue-102154.rs => ice-assoc-type-loop-102154.rs} (100%) rename tests/rustdoc/{issue-105952.rs => ice-associated-const-equality-105952.rs} (100%) rename tests/rustdoc/{issue-107995.rs => ice-intra-doc-links-107995.rs} (100%) rename tests/rustdoc/{issue-100620.rs => ice-method-where-clause-circular-100620.rs} (100%) rename tests/rustdoc/{issue-100241.rs => ice-unresolved-import-100241.rs} (100%) rename tests/rustdoc/{issue-100204-inline-impl-through-glob-import.rs => inline-impl-through-glob-import-100204.rs} (100%) rename tests/rustdoc/{issue-108231.rs => macro-export-crate-root-108231.rs} (100%) rename tests/rustdoc/{issue-106142.rs => macro-rules-broken-intra-doc-106142.rs} (100%) rename tests/rustdoc/{issue-99734-multiple-foreigns-w-same-name.rs => multiple-foreigns-w-same-name-99734.rs} (100%) rename tests/rustdoc/{issue-99221-multiple-macro-rules-w-same-name.rs => multiple-macro-rules-w-same-name-99221.rs} (100%) rename tests/rustdoc/{issue-99734-multiple-mods-w-same-name.rs => multiple-mods-w-same-name-99734.rs} (100%) rename tests/rustdoc/{issue-99221-multiple-structs-w-same-name.rs => multiple-structs-w-same-name-99221.rs} (100%) rename tests/rustdoc/{issue-105735-overlapping-reexport-2.rs => overlapping-reexport-105735-2.rs} (100%) rename tests/rustdoc/{issue-105735-overlapping-reexport.rs => overlapping-reexport-105735.rs} (100%) rename tests/rustdoc/{issue-107350.rs => pub-use-loop-107350.rs} (100%) rename tests/rustdoc/{issue-108679-reexport-of-reexport.rs => reexport-of-reexport-108679.rs} (100%) diff --git a/tests/rustdoc/issue-108281.rs b/tests/rustdoc/attributes-inlining-108281.rs similarity index 100% rename from tests/rustdoc/issue-108281.rs rename to tests/rustdoc/attributes-inlining-108281.rs diff --git a/tests/rustdoc/issue-101743-bold-tag.rs b/tests/rustdoc/bold-tag-101743.rs similarity index 100% rename from tests/rustdoc/issue-101743-bold-tag.rs rename to tests/rustdoc/bold-tag-101743.rs diff --git a/tests/rustdoc/issue-106421-not-internal.rs b/tests/rustdoc/force-unstable-if-unmarked-106421-not-internal.rs similarity index 100% rename from tests/rustdoc/issue-106421-not-internal.rs rename to tests/rustdoc/force-unstable-if-unmarked-106421-not-internal.rs diff --git a/tests/rustdoc/issue-106421.rs b/tests/rustdoc/force-unstable-if-unmarked-106421.rs similarity index 100% rename from tests/rustdoc/issue-106421.rs rename to tests/rustdoc/force-unstable-if-unmarked-106421.rs diff --git a/tests/rustdoc/issue-102154.rs b/tests/rustdoc/ice-assoc-type-loop-102154.rs similarity index 100% rename from tests/rustdoc/issue-102154.rs rename to tests/rustdoc/ice-assoc-type-loop-102154.rs diff --git a/tests/rustdoc/issue-105952.rs b/tests/rustdoc/ice-associated-const-equality-105952.rs similarity index 100% rename from tests/rustdoc/issue-105952.rs rename to tests/rustdoc/ice-associated-const-equality-105952.rs diff --git a/tests/rustdoc/issue-107995.rs b/tests/rustdoc/ice-intra-doc-links-107995.rs similarity index 100% rename from tests/rustdoc/issue-107995.rs rename to tests/rustdoc/ice-intra-doc-links-107995.rs diff --git a/tests/rustdoc/issue-100620.rs b/tests/rustdoc/ice-method-where-clause-circular-100620.rs similarity index 100% rename from tests/rustdoc/issue-100620.rs rename to tests/rustdoc/ice-method-where-clause-circular-100620.rs diff --git a/tests/rustdoc/issue-100241.rs b/tests/rustdoc/ice-unresolved-import-100241.rs similarity index 100% rename from tests/rustdoc/issue-100241.rs rename to tests/rustdoc/ice-unresolved-import-100241.rs diff --git a/tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs b/tests/rustdoc/inline-impl-through-glob-import-100204.rs similarity index 100% rename from tests/rustdoc/issue-100204-inline-impl-through-glob-import.rs rename to tests/rustdoc/inline-impl-through-glob-import-100204.rs diff --git a/tests/rustdoc/issue-108231.rs b/tests/rustdoc/macro-export-crate-root-108231.rs similarity index 100% rename from tests/rustdoc/issue-108231.rs rename to tests/rustdoc/macro-export-crate-root-108231.rs diff --git a/tests/rustdoc/issue-106142.rs b/tests/rustdoc/macro-rules-broken-intra-doc-106142.rs similarity index 100% rename from tests/rustdoc/issue-106142.rs rename to tests/rustdoc/macro-rules-broken-intra-doc-106142.rs diff --git a/tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs b/tests/rustdoc/multiple-foreigns-w-same-name-99734.rs similarity index 100% rename from tests/rustdoc/issue-99734-multiple-foreigns-w-same-name.rs rename to tests/rustdoc/multiple-foreigns-w-same-name-99734.rs diff --git a/tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs b/tests/rustdoc/multiple-macro-rules-w-same-name-99221.rs similarity index 100% rename from tests/rustdoc/issue-99221-multiple-macro-rules-w-same-name.rs rename to tests/rustdoc/multiple-macro-rules-w-same-name-99221.rs diff --git a/tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs b/tests/rustdoc/multiple-mods-w-same-name-99734.rs similarity index 100% rename from tests/rustdoc/issue-99734-multiple-mods-w-same-name.rs rename to tests/rustdoc/multiple-mods-w-same-name-99734.rs diff --git a/tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs b/tests/rustdoc/multiple-structs-w-same-name-99221.rs similarity index 100% rename from tests/rustdoc/issue-99221-multiple-structs-w-same-name.rs rename to tests/rustdoc/multiple-structs-w-same-name-99221.rs diff --git a/tests/rustdoc/issue-105735-overlapping-reexport-2.rs b/tests/rustdoc/overlapping-reexport-105735-2.rs similarity index 100% rename from tests/rustdoc/issue-105735-overlapping-reexport-2.rs rename to tests/rustdoc/overlapping-reexport-105735-2.rs diff --git a/tests/rustdoc/issue-105735-overlapping-reexport.rs b/tests/rustdoc/overlapping-reexport-105735.rs similarity index 100% rename from tests/rustdoc/issue-105735-overlapping-reexport.rs rename to tests/rustdoc/overlapping-reexport-105735.rs diff --git a/tests/rustdoc/issue-107350.rs b/tests/rustdoc/pub-use-loop-107350.rs similarity index 100% rename from tests/rustdoc/issue-107350.rs rename to tests/rustdoc/pub-use-loop-107350.rs diff --git a/tests/rustdoc/issue-108679-reexport-of-reexport.rs b/tests/rustdoc/reexport-of-reexport-108679.rs similarity index 100% rename from tests/rustdoc/issue-108679-reexport-of-reexport.rs rename to tests/rustdoc/reexport-of-reexport-108679.rs From 42ee400b0ffa7eeffb51e5b1e2e3fbcc6a130e0c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 12 Jul 2024 18:16:30 -0700 Subject: [PATCH 3/3] Move assertion-free rustdoc ice tests to rustdoc-ui --- tests/{rustdoc => rustdoc-ui}/ice-assoc-type-loop-102154.rs | 1 + .../ice-method-where-clause-circular-100620.rs | 1 + tests/{rustdoc => rustdoc-ui}/ice-unresolved-import-100241.rs | 0 3 files changed, 2 insertions(+) rename tests/{rustdoc => rustdoc-ui}/ice-assoc-type-loop-102154.rs (94%) rename tests/{rustdoc => rustdoc-ui}/ice-method-where-clause-circular-100620.rs (95%) rename tests/{rustdoc => rustdoc-ui}/ice-unresolved-import-100241.rs (100%) diff --git a/tests/rustdoc/ice-assoc-type-loop-102154.rs b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs similarity index 94% rename from tests/rustdoc/ice-assoc-type-loop-102154.rs rename to tests/rustdoc-ui/ice-assoc-type-loop-102154.rs index 58cabe769272b..68e22ce6ea154 100644 --- a/tests/rustdoc/ice-assoc-type-loop-102154.rs +++ b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs @@ -1,3 +1,4 @@ +//@ check-pass // https://github.com/rust-lang/rust/issues/102154 trait A { diff --git a/tests/rustdoc/ice-method-where-clause-circular-100620.rs b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs similarity index 95% rename from tests/rustdoc/ice-method-where-clause-circular-100620.rs rename to tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs index 39d70bab29e4a..e12b214410bc2 100644 --- a/tests/rustdoc/ice-method-where-clause-circular-100620.rs +++ b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs @@ -1,3 +1,4 @@ +//@ check-pass // https://github.com/rust-lang/rust/issues/100620 pub trait Bar {} diff --git a/tests/rustdoc/ice-unresolved-import-100241.rs b/tests/rustdoc-ui/ice-unresolved-import-100241.rs similarity index 100% rename from tests/rustdoc/ice-unresolved-import-100241.rs rename to tests/rustdoc-ui/ice-unresolved-import-100241.rs