From fdef34b4ddfeebf614bb58622b4053cff616234a Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 29 Jan 2025 11:20:22 -0700 Subject: [PATCH 1/4] Add URL and `crate_name` to test cases --- tests/rustdoc/inline_cross/issue-24183.rs | 1 + tests/rustdoc/inline_cross/issue-28480.rs | 5 ++++- tests/rustdoc/inline_cross/issue-31948-1.rs | 13 ++++++++----- tests/rustdoc/inline_cross/issue-31948-2.rs | 13 ++++++++----- tests/rustdoc/inline_cross/issue-31948.rs | 17 ++++++++++------- tests/rustdoc/inline_cross/issue-32881.rs | 5 ++++- tests/rustdoc/inline_cross/issue-33113.rs | 5 ++++- tests/rustdoc/inline_cross/issue-76736-1.rs | 2 ++ tests/rustdoc/inline_cross/issue-76736-2.rs | 2 ++ tests/rustdoc/inline_cross/issue-76736-3.rs | 2 ++ tests/rustdoc/inline_cross/issue-76736-4.rs | 2 ++ tests/rustdoc/inline_local/issue-28537.rs | 7 +++++-- tests/rustdoc/inline_local/issue-32343.rs | 13 ++++++++----- tests/rustdoc/intra-doc/issue-103463.rs | 2 ++ tests/rustdoc/intra-doc/issue-104145.rs | 2 ++ tests/rustdoc/intra-doc/issue-108459.rs | 11 +++++++---- tests/rustdoc/intra-doc/issue-66159.rs | 5 ++++- tests/rustdoc/intra-doc/issue-82209.rs | 2 ++ 18 files changed, 77 insertions(+), 32 deletions(-) diff --git a/tests/rustdoc/inline_cross/issue-24183.rs b/tests/rustdoc/inline_cross/issue-24183.rs index 8299eecc575d1..909005532f505 100644 --- a/tests/rustdoc/inline_cross/issue-24183.rs +++ b/tests/rustdoc/inline_cross/issue-24183.rs @@ -1,3 +1,4 @@ +// https://github.com/rust-lang/rust/issues/24183 #![crate_type = "lib"] #![crate_name = "usr"] diff --git a/tests/rustdoc/inline_cross/issue-28480.rs b/tests/rustdoc/inline_cross/issue-28480.rs index 004510fd9225e..e1ca7403c03f6 100644 --- a/tests/rustdoc/inline_cross/issue-28480.rs +++ b/tests/rustdoc/inline_cross/issue-28480.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/28480 +#![crate_name="foobar"] + //@ aux-build:rustdoc-hidden-sig.rs //@ build-aux-docs //@ ignore-cross-compile @@ -7,7 +10,7 @@ //@ has - '//a' 'u8' extern crate rustdoc_hidden_sig; -//@ has issue_28480/struct.Bar.html +//@ has foobar/struct.Bar.html //@ !has - '//a/@title' 'Hidden' //@ has - '//a' 'u8' pub use rustdoc_hidden_sig::Bar; diff --git a/tests/rustdoc/inline_cross/issue-31948-1.rs b/tests/rustdoc/inline_cross/issue-31948-1.rs index e59da87c29de7..baab1da95470c 100644 --- a/tests/rustdoc/inline_cross/issue-31948-1.rs +++ b/tests/rustdoc/inline_cross/issue-31948-1.rs @@ -1,27 +1,30 @@ +// https://github.com/rust-lang/rust/issues/31948 +#![crate_name="foobar"] + //@ aux-build:rustdoc-nonreachable-impls.rs //@ build-aux-docs //@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; -//@ has issue_31948_1/struct.Wobble.html +//@ has foobar/struct.Wobble.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for' pub use rustdoc_nonreachable_impls::hidden::Wobble; -//@ has issue_31948_1/trait.Bark.html +//@ has foobar/trait.Bark.html //@ has - '//h3[@class="code-header"]' 'for Foo' //@ has - '//h3[@class="code-header"]' 'for Wobble' //@ !has - '//h3[@class="code-header"]' 'for Wibble' pub use rustdoc_nonreachable_impls::Bark; -//@ has issue_31948_1/trait.Woof.html +//@ has foobar/trait.Woof.html //@ has - '//h3[@class="code-header"]' 'for Foo' //@ has - '//h3[@class="code-header"]' 'for Wobble' //@ !has - '//h3[@class="code-header"]' 'for Wibble' pub use rustdoc_nonreachable_impls::Woof; -//@ !has issue_31948_1/trait.Bar.html -//@ !has issue_31948_1/trait.Qux.html +//@ !has foobar/trait.Bar.html +//@ !has foobar/trait.Qux.html diff --git a/tests/rustdoc/inline_cross/issue-31948-2.rs b/tests/rustdoc/inline_cross/issue-31948-2.rs index 34b570528832a..40e9108ec62ef 100644 --- a/tests/rustdoc/inline_cross/issue-31948-2.rs +++ b/tests/rustdoc/inline_cross/issue-31948-2.rs @@ -1,21 +1,24 @@ +// https://github.com/rust-lang/rust/issues/31948 +#![crate_name="foobar"] + //@ aux-build:rustdoc-nonreachable-impls.rs //@ build-aux-docs //@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; -//@ has issue_31948_2/struct.Wobble.html +//@ has foobar/struct.Wobble.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for' pub use rustdoc_nonreachable_impls::hidden::Wobble; -//@ has issue_31948_2/trait.Qux.html +//@ has foobar/trait.Qux.html //@ has - '//h3[@class="code-header"]' 'for Foo' //@ has - '//h3[@class="code-header"]' 'for Wobble' pub use rustdoc_nonreachable_impls::hidden::Qux; -//@ !has issue_31948_2/trait.Bar.html -//@ !has issue_31948_2/trait.Woof.html -//@ !has issue_31948_2/trait.Bark.html +//@ !has foobar/trait.Bar.html +//@ !has foobar/trait.Woof.html +//@ !has foobar/trait.Bark.html diff --git a/tests/rustdoc/inline_cross/issue-31948.rs b/tests/rustdoc/inline_cross/issue-31948.rs index 7a43fc7b279de..ab0048513c729 100644 --- a/tests/rustdoc/inline_cross/issue-31948.rs +++ b/tests/rustdoc/inline_cross/issue-31948.rs @@ -1,29 +1,32 @@ +// https://github.com/rust-lang/rust/issues/31948 +#![crate_name="foobar"] + //@ aux-build:rustdoc-nonreachable-impls.rs //@ build-aux-docs //@ ignore-cross-compile extern crate rustdoc_nonreachable_impls; -//@ has issue_31948/struct.Foo.html +//@ has foobar/struct.Foo.html //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bark for' //@ has - '//*[@class="impl"]//h3[@class="code-header"]' 'Woof for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Bar for' //@ !has - '//*[@class="impl"]//h3[@class="code-header"]' 'Qux for' pub use rustdoc_nonreachable_impls::Foo; -//@ has issue_31948/trait.Bark.html +//@ has foobar/trait.Bark.html //@ has - '//h3[@class="code-header"]' 'for Foo' //@ !has - '//h3[@class="code-header"]' 'for Wibble' //@ !has - '//h3[@class="code-header"]' 'for Wobble' pub use rustdoc_nonreachable_impls::Bark; -//@ has issue_31948/trait.Woof.html +//@ has foobar/trait.Woof.html //@ has - '//h3[@class="code-header"]' 'for Foo' //@ !has - '//h3[@class="code-header"]' 'for Wibble' //@ !has - '//h3[@class="code-header"]' 'for Wobble' pub use rustdoc_nonreachable_impls::Woof; -//@ !has issue_31948/trait.Bar.html -//@ !has issue_31948/trait.Qux.html -//@ !has issue_31948/struct.Wibble.html -//@ !has issue_31948/struct.Wobble.html +//@ !has foobar/trait.Bar.html +//@ !has foobar/trait.Qux.html +//@ !has foobar/struct.Wibble.html +//@ !has foobar/struct.Wobble.html diff --git a/tests/rustdoc/inline_cross/issue-32881.rs b/tests/rustdoc/inline_cross/issue-32881.rs index d4ebf10a1ca9a..f7dc741445520 100644 --- a/tests/rustdoc/inline_cross/issue-32881.rs +++ b/tests/rustdoc/inline_cross/issue-32881.rs @@ -1,10 +1,13 @@ +// https://github.com/rust-lang/rust/issues/32881 +#![crate_name="foobar"] + //@ aux-build:rustdoc-trait-object-impl.rs //@ build-aux-docs //@ ignore-cross-compile extern crate rustdoc_trait_object_impl; -//@ has issue_32881/trait.Bar.html +//@ has foobar/trait.Bar.html //@ has - '//h3[@class="code-header"]' "impl<'a> dyn Bar" //@ has - '//h3[@class="code-header"]' "impl<'a> Debug for dyn Bar" diff --git a/tests/rustdoc/inline_cross/issue-33113.rs b/tests/rustdoc/inline_cross/issue-33113.rs index 05e87d962cb67..9ac4f02e00c15 100644 --- a/tests/rustdoc/inline_cross/issue-33113.rs +++ b/tests/rustdoc/inline_cross/issue-33113.rs @@ -1,10 +1,13 @@ +// https://github.com/rust-lang/rust/issues/33113 +#![crate_name="foobar"] + //@ aux-build:issue-33113.rs //@ build-aux-docs //@ ignore-cross-compile extern crate bar; -//@ has issue_33113/trait.Bar.html +//@ has foobar/trait.Bar.html //@ has - '//h3[@class="code-header"]' "for &'a char" //@ has - '//h3[@class="code-header"]' "for Foo" pub use bar::Bar; diff --git a/tests/rustdoc/inline_cross/issue-76736-1.rs b/tests/rustdoc/inline_cross/issue-76736-1.rs index fe52702fd6f51..3ffa5e6cc06e9 100644 --- a/tests/rustdoc/inline_cross/issue-76736-1.rs +++ b/tests/rustdoc/inline_cross/issue-76736-1.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/76736 + //@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-2.rs b/tests/rustdoc/inline_cross/issue-76736-2.rs index df376ebe9a143..843b2941602cb 100644 --- a/tests/rustdoc/inline_cross/issue-76736-2.rs +++ b/tests/rustdoc/inline_cross/issue-76736-2.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/76736 + //@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-3.rs b/tests/rustdoc/inline_cross/issue-76736-3.rs index 1bed4621c049e..f9b46caa02ff6 100644 --- a/tests/rustdoc/inline_cross/issue-76736-3.rs +++ b/tests/rustdoc/inline_cross/issue-76736-3.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/76736 + //@ compile-flags: -Zforce-unstable-if-unmarked //@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-4.rs b/tests/rustdoc/inline_cross/issue-76736-4.rs index 487e90301082b..511464f2c498f 100644 --- a/tests/rustdoc/inline_cross/issue-76736-4.rs +++ b/tests/rustdoc/inline_cross/issue-76736-4.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/76736 + //@ aux-build:issue-76736-1.rs //@ aux-build:issue-76736-2.rs diff --git a/tests/rustdoc/inline_local/issue-28537.rs b/tests/rustdoc/inline_local/issue-28537.rs index d5ba94d2e6c9e..0e9836c7ceeab 100644 --- a/tests/rustdoc/inline_local/issue-28537.rs +++ b/tests/rustdoc/inline_local/issue-28537.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/28537 +#![crate_name="foo"] + #[doc(hidden)] pub mod foo { pub struct Foo; @@ -10,8 +13,8 @@ mod bar { } } -//@ has issue_28537/struct.Foo.html +//@ has foo/struct.Foo.html pub use foo::Foo; -//@ has issue_28537/struct.Bar.html +//@ has foo/struct.Bar.html pub use self::bar::Bar; diff --git a/tests/rustdoc/inline_local/issue-32343.rs b/tests/rustdoc/inline_local/issue-32343.rs index 2ec123fdc5cfe..ed11614a50038 100644 --- a/tests/rustdoc/inline_local/issue-32343.rs +++ b/tests/rustdoc/inline_local/issue-32343.rs @@ -1,12 +1,15 @@ -//@ !has issue_32343/struct.Foo.html -//@ has issue_32343/index.html +// https://github.com/rust-lang/rust/issues/32343 +#![crate_name="foobar"] + +//@ !has foobar/struct.Foo.html +//@ has foobar/index.html //@ has - '//code' 'pub use foo::Foo' //@ !has - '//code/a' 'Foo' #[doc(no_inline)] pub use foo::Foo; -//@ !has issue_32343/struct.Bar.html -//@ has issue_32343/index.html +//@ !has foobar/struct.Bar.html +//@ has foobar/index.html //@ has - '//code' 'pub use foo::Bar' //@ has - '//code/a' 'Bar' #[doc(no_inline)] @@ -18,6 +21,6 @@ mod foo { } pub mod bar { - //@ has issue_32343/bar/struct.Bar.html + //@ has foobar/bar/struct.Bar.html pub use ::foo::Bar; } diff --git a/tests/rustdoc/intra-doc/issue-103463.rs b/tests/rustdoc/intra-doc/issue-103463.rs index 9b5cb67fd32a6..bfe5c4f05d4da 100644 --- a/tests/rustdoc/intra-doc/issue-103463.rs +++ b/tests/rustdoc/intra-doc/issue-103463.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/103463 + // The `Trait` is not pulled into the crate resulting in doc links in its methods being resolved. //@ aux-build:issue-103463-aux.rs diff --git a/tests/rustdoc/intra-doc/issue-104145.rs b/tests/rustdoc/intra-doc/issue-104145.rs index 5690803af5ae9..92c7fa31b4fec 100644 --- a/tests/rustdoc/intra-doc/issue-104145.rs +++ b/tests/rustdoc/intra-doc/issue-104145.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/104145 + // Doc links in `Trait`'s methods are resolved because it has a local impl. //@ aux-build:issue-103463-aux.rs diff --git a/tests/rustdoc/intra-doc/issue-108459.rs b/tests/rustdoc/intra-doc/issue-108459.rs index 18424c069d359..0328e6435a530 100644 --- a/tests/rustdoc/intra-doc/issue-108459.rs +++ b/tests/rustdoc/intra-doc/issue-108459.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/108459 +#![crate_name="foobar"] + #![deny(rustdoc::broken_intra_doc_links)] #![allow(rustdoc::redundant_explicit_links)] @@ -13,13 +16,13 @@ pub struct MyStruct1; // the same target but different text /// See also [crate::char] and [mod@char] and [prim@char] -//@ has issue_108459/struct.MyStruct2.html '//*[@href="char/index.html"]' 'crate::char' +//@ has foobar/struct.MyStruct2.html '//*[@href="char/index.html"]' 'crate::char' //@ has - '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct2; /// See also [mod@char] and [prim@char] and [crate::char] -//@ has issue_108459/struct.MyStruct3.html '//*[@href="char/index.html"]' 'crate::char' +//@ has foobar/struct.MyStruct3.html '//*[@href="char/index.html"]' 'crate::char' //@ has - '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct3; @@ -28,11 +31,11 @@ pub struct MyStruct3; // different targets /// See also [char][mod@char] and [char][prim@char] -//@ has issue_108459/struct.MyStruct4.html '//*[@href="char/index.html"]' 'char' +//@ has foobar/struct.MyStruct4.html '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct4; /// See also [char][prim@char] and [char][crate::char] -//@ has issue_108459/struct.MyStruct5.html '//*[@href="char/index.html"]' 'char' +//@ has foobar/struct.MyStruct5.html '//*[@href="char/index.html"]' 'char' //@ has - '//*[@href="{{channel}}/std/primitive.char.html"]' 'char' pub struct MyStruct5; diff --git a/tests/rustdoc/intra-doc/issue-66159.rs b/tests/rustdoc/intra-doc/issue-66159.rs index 5d50f63f299f9..7e3ace9355aeb 100644 --- a/tests/rustdoc/intra-doc/issue-66159.rs +++ b/tests/rustdoc/intra-doc/issue-66159.rs @@ -1,3 +1,6 @@ +// https://github.com/rust-lang/rust/issues/66159 +#![crate_name="foobar"] + //@ aux-crate:priv:pub_struct=pub-struct.rs //@ compile-flags:-Z unstable-options @@ -6,5 +9,5 @@ // Since we don't generate the docs for the auxiliary files, we can't actually // verify that the struct is linked correctly. -//@ has issue_66159/index.html +//@ has foobar/index.html //! [pub_struct::SomeStruct] diff --git a/tests/rustdoc/intra-doc/issue-82209.rs b/tests/rustdoc/intra-doc/issue-82209.rs index 46d028e535c2f..615115a5f8b2c 100644 --- a/tests/rustdoc/intra-doc/issue-82209.rs +++ b/tests/rustdoc/intra-doc/issue-82209.rs @@ -1,3 +1,5 @@ +// https://github.com/rust-lang/rust/issues/82209 + #![crate_name = "foo"] #![deny(rustdoc::broken_intra_doc_links)] pub enum Foo { From eb457da5cafc0eb907a0ecf70ffae5a37cd4e8f0 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 29 Jan 2025 11:36:36 -0700 Subject: [PATCH 2/4] rustdoc: rename `issue-\d+.rs` tests to have meaningful names --- .../intra-doc/auxiliary/issue-103463-aux.rs | 0 .../issue-103463.rs => rustdoc-ui/intra-doc/ice-103463.rs} | 1 + .../issue-104145.rs => rustdoc-ui/intra-doc/ice-104145.rs} | 1 + .../{issue-28480.rs => doc-hidden-broken-link-28480.rs} | 0 .../{issue-31948-1.rs => doc-hidden-module-impl-31948-1.rs} | 0 .../{issue-31948-2.rs => doc-hidden-module-impl-31948-2.rs} | 0 .../{issue-31948.rs => doc-hidden-module-impl-31948.rs} | 0 .../inline_cross/{issue-32881.rs => impl-dyn-trait-32881.rs} | 0 tests/rustdoc/inline_cross/{issue-33113.rs => impl-ref-33113.rs} | 0 .../inline_cross/{issue-76736-1.rs => rustc-private-76736-1.rs} | 0 .../inline_cross/{issue-76736-2.rs => rustc-private-76736-2.rs} | 0 .../inline_cross/{issue-76736-3.rs => rustc-private-76736-3.rs} | 0 .../inline_cross/{issue-76736-4.rs => rustc-private-76736-4.rs} | 0 ...l => self-sized-bounds-24183.method_no_where_self_sized.html} | 0 .../inline_cross/{issue-24183.rs => self-sized-bounds-24183.rs} | 0 .../inline_local/{issue-32343.rs => doc-no-inline-32343.rs} | 0 .../inline_local/{issue-28537.rs => pub-re-export-28537.rs} | 0 tests/rustdoc/intra-doc/{issue-82209.rs => enum-self-82209.rs} | 0 ...08459.rs => link-same-name-different-disambiguator-108459.rs} | 0 .../{issue-66159.rs => same-name-different-crates-66159.rs} | 0 20 files changed, 2 insertions(+) rename tests/{rustdoc => rustdoc-ui}/intra-doc/auxiliary/issue-103463-aux.rs (100%) rename tests/{rustdoc/intra-doc/issue-103463.rs => rustdoc-ui/intra-doc/ice-103463.rs} (94%) rename tests/{rustdoc/intra-doc/issue-104145.rs => rustdoc-ui/intra-doc/ice-104145.rs} (95%) rename tests/rustdoc/inline_cross/{issue-28480.rs => doc-hidden-broken-link-28480.rs} (100%) rename tests/rustdoc/inline_cross/{issue-31948-1.rs => doc-hidden-module-impl-31948-1.rs} (100%) rename tests/rustdoc/inline_cross/{issue-31948-2.rs => doc-hidden-module-impl-31948-2.rs} (100%) rename tests/rustdoc/inline_cross/{issue-31948.rs => doc-hidden-module-impl-31948.rs} (100%) rename tests/rustdoc/inline_cross/{issue-32881.rs => impl-dyn-trait-32881.rs} (100%) rename tests/rustdoc/inline_cross/{issue-33113.rs => impl-ref-33113.rs} (100%) rename tests/rustdoc/inline_cross/{issue-76736-1.rs => rustc-private-76736-1.rs} (100%) rename tests/rustdoc/inline_cross/{issue-76736-2.rs => rustc-private-76736-2.rs} (100%) rename tests/rustdoc/inline_cross/{issue-76736-3.rs => rustc-private-76736-3.rs} (100%) rename tests/rustdoc/inline_cross/{issue-76736-4.rs => rustc-private-76736-4.rs} (100%) rename tests/rustdoc/inline_cross/{issue-24183.method_no_where_self_sized.html => self-sized-bounds-24183.method_no_where_self_sized.html} (100%) rename tests/rustdoc/inline_cross/{issue-24183.rs => self-sized-bounds-24183.rs} (100%) rename tests/rustdoc/inline_local/{issue-32343.rs => doc-no-inline-32343.rs} (100%) rename tests/rustdoc/inline_local/{issue-28537.rs => pub-re-export-28537.rs} (100%) rename tests/rustdoc/intra-doc/{issue-82209.rs => enum-self-82209.rs} (100%) rename tests/rustdoc/intra-doc/{issue-108459.rs => link-same-name-different-disambiguator-108459.rs} (100%) rename tests/rustdoc/intra-doc/{issue-66159.rs => same-name-different-crates-66159.rs} (100%) diff --git a/tests/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs b/tests/rustdoc-ui/intra-doc/auxiliary/issue-103463-aux.rs similarity index 100% rename from tests/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs rename to tests/rustdoc-ui/intra-doc/auxiliary/issue-103463-aux.rs diff --git a/tests/rustdoc/intra-doc/issue-103463.rs b/tests/rustdoc-ui/intra-doc/ice-103463.rs similarity index 94% rename from tests/rustdoc/intra-doc/issue-103463.rs rename to tests/rustdoc-ui/intra-doc/ice-103463.rs index bfe5c4f05d4da..10894282e55b4 100644 --- a/tests/rustdoc/intra-doc/issue-103463.rs +++ b/tests/rustdoc-ui/intra-doc/ice-103463.rs @@ -1,4 +1,5 @@ // https://github.com/rust-lang/rust/issues/103463 +//@ check-pass // The `Trait` is not pulled into the crate resulting in doc links in its methods being resolved. diff --git a/tests/rustdoc/intra-doc/issue-104145.rs b/tests/rustdoc-ui/intra-doc/ice-104145.rs similarity index 95% rename from tests/rustdoc/intra-doc/issue-104145.rs rename to tests/rustdoc-ui/intra-doc/ice-104145.rs index 92c7fa31b4fec..0e403b21c8a18 100644 --- a/tests/rustdoc/intra-doc/issue-104145.rs +++ b/tests/rustdoc-ui/intra-doc/ice-104145.rs @@ -1,4 +1,5 @@ // https://github.com/rust-lang/rust/issues/104145 +//@ check-pass // Doc links in `Trait`'s methods are resolved because it has a local impl. diff --git a/tests/rustdoc/inline_cross/issue-28480.rs b/tests/rustdoc/inline_cross/doc-hidden-broken-link-28480.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-28480.rs rename to tests/rustdoc/inline_cross/doc-hidden-broken-link-28480.rs diff --git a/tests/rustdoc/inline_cross/issue-31948-1.rs b/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-1.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-31948-1.rs rename to tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-1.rs diff --git a/tests/rustdoc/inline_cross/issue-31948-2.rs b/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-2.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-31948-2.rs rename to tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-2.rs diff --git a/tests/rustdoc/inline_cross/issue-31948.rs b/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-31948.rs rename to tests/rustdoc/inline_cross/doc-hidden-module-impl-31948.rs diff --git a/tests/rustdoc/inline_cross/issue-32881.rs b/tests/rustdoc/inline_cross/impl-dyn-trait-32881.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-32881.rs rename to tests/rustdoc/inline_cross/impl-dyn-trait-32881.rs diff --git a/tests/rustdoc/inline_cross/issue-33113.rs b/tests/rustdoc/inline_cross/impl-ref-33113.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-33113.rs rename to tests/rustdoc/inline_cross/impl-ref-33113.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-1.rs b/tests/rustdoc/inline_cross/rustc-private-76736-1.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-76736-1.rs rename to tests/rustdoc/inline_cross/rustc-private-76736-1.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-2.rs b/tests/rustdoc/inline_cross/rustc-private-76736-2.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-76736-2.rs rename to tests/rustdoc/inline_cross/rustc-private-76736-2.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-3.rs b/tests/rustdoc/inline_cross/rustc-private-76736-3.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-76736-3.rs rename to tests/rustdoc/inline_cross/rustc-private-76736-3.rs diff --git a/tests/rustdoc/inline_cross/issue-76736-4.rs b/tests/rustdoc/inline_cross/rustc-private-76736-4.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-76736-4.rs rename to tests/rustdoc/inline_cross/rustc-private-76736-4.rs diff --git a/tests/rustdoc/inline_cross/issue-24183.method_no_where_self_sized.html b/tests/rustdoc/inline_cross/self-sized-bounds-24183.method_no_where_self_sized.html similarity index 100% rename from tests/rustdoc/inline_cross/issue-24183.method_no_where_self_sized.html rename to tests/rustdoc/inline_cross/self-sized-bounds-24183.method_no_where_self_sized.html diff --git a/tests/rustdoc/inline_cross/issue-24183.rs b/tests/rustdoc/inline_cross/self-sized-bounds-24183.rs similarity index 100% rename from tests/rustdoc/inline_cross/issue-24183.rs rename to tests/rustdoc/inline_cross/self-sized-bounds-24183.rs diff --git a/tests/rustdoc/inline_local/issue-32343.rs b/tests/rustdoc/inline_local/doc-no-inline-32343.rs similarity index 100% rename from tests/rustdoc/inline_local/issue-32343.rs rename to tests/rustdoc/inline_local/doc-no-inline-32343.rs diff --git a/tests/rustdoc/inline_local/issue-28537.rs b/tests/rustdoc/inline_local/pub-re-export-28537.rs similarity index 100% rename from tests/rustdoc/inline_local/issue-28537.rs rename to tests/rustdoc/inline_local/pub-re-export-28537.rs diff --git a/tests/rustdoc/intra-doc/issue-82209.rs b/tests/rustdoc/intra-doc/enum-self-82209.rs similarity index 100% rename from tests/rustdoc/intra-doc/issue-82209.rs rename to tests/rustdoc/intra-doc/enum-self-82209.rs diff --git a/tests/rustdoc/intra-doc/issue-108459.rs b/tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs similarity index 100% rename from tests/rustdoc/intra-doc/issue-108459.rs rename to tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs diff --git a/tests/rustdoc/intra-doc/issue-66159.rs b/tests/rustdoc/intra-doc/same-name-different-crates-66159.rs similarity index 100% rename from tests/rustdoc/intra-doc/issue-66159.rs rename to tests/rustdoc/intra-doc/same-name-different-crates-66159.rs From a1a55a2e0abccb31d61ecd32b197a6f8ff287e51 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 30 Jan 2025 12:05:31 -0700 Subject: [PATCH 3/4] Give 104145, 103463, and 31948 more descriptive names --- .../{ice-104145.rs => ice-extern-trait-local-impl-104145.rs} | 0 .../intra-doc/{ice-103463.rs => ice-priv-use-103463.rs} | 0 ...en-module-impl-31948-1.rs => doc-reachability-impl-31948-1.rs} | 0 ...en-module-impl-31948-2.rs => doc-reachability-impl-31948-2.rs} | 0 ...hidden-module-impl-31948.rs => doc-reachability-impl-31948.rs} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename tests/rustdoc-ui/intra-doc/{ice-104145.rs => ice-extern-trait-local-impl-104145.rs} (100%) rename tests/rustdoc-ui/intra-doc/{ice-103463.rs => ice-priv-use-103463.rs} (100%) rename tests/rustdoc/inline_cross/{doc-hidden-module-impl-31948-1.rs => doc-reachability-impl-31948-1.rs} (100%) rename tests/rustdoc/inline_cross/{doc-hidden-module-impl-31948-2.rs => doc-reachability-impl-31948-2.rs} (100%) rename tests/rustdoc/inline_cross/{doc-hidden-module-impl-31948.rs => doc-reachability-impl-31948.rs} (100%) diff --git a/tests/rustdoc-ui/intra-doc/ice-104145.rs b/tests/rustdoc-ui/intra-doc/ice-extern-trait-local-impl-104145.rs similarity index 100% rename from tests/rustdoc-ui/intra-doc/ice-104145.rs rename to tests/rustdoc-ui/intra-doc/ice-extern-trait-local-impl-104145.rs diff --git a/tests/rustdoc-ui/intra-doc/ice-103463.rs b/tests/rustdoc-ui/intra-doc/ice-priv-use-103463.rs similarity index 100% rename from tests/rustdoc-ui/intra-doc/ice-103463.rs rename to tests/rustdoc-ui/intra-doc/ice-priv-use-103463.rs diff --git a/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-1.rs b/tests/rustdoc/inline_cross/doc-reachability-impl-31948-1.rs similarity index 100% rename from tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-1.rs rename to tests/rustdoc/inline_cross/doc-reachability-impl-31948-1.rs diff --git a/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-2.rs b/tests/rustdoc/inline_cross/doc-reachability-impl-31948-2.rs similarity index 100% rename from tests/rustdoc/inline_cross/doc-hidden-module-impl-31948-2.rs rename to tests/rustdoc/inline_cross/doc-reachability-impl-31948-2.rs diff --git a/tests/rustdoc/inline_cross/doc-hidden-module-impl-31948.rs b/tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs similarity index 100% rename from tests/rustdoc/inline_cross/doc-hidden-module-impl-31948.rs rename to tests/rustdoc/inline_cross/doc-reachability-impl-31948.rs From c17d5689dac5f82464ca09bbcd56a1c694effd92 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Thu, 30 Jan 2025 12:09:33 -0700 Subject: [PATCH 4/4] Direct link 108459 to issues -> pull redirect --- .../intra-doc/link-same-name-different-disambiguator-108459.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs b/tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs index 0328e6435a530..0b339eaf6b27c 100644 --- a/tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs +++ b/tests/rustdoc/intra-doc/link-same-name-different-disambiguator-108459.rs @@ -1,4 +1,4 @@ -// https://github.com/rust-lang/rust/issues/108459 +// https://github.com/rust-lang/rust/pull/108459 #![crate_name="foobar"] #![deny(rustdoc::broken_intra_doc_links)]