Rollup merge of #136258 - notriddle:notriddle/issue-d, r=fmease

rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 11)

Follow up

* https://github.com/rust-lang/rust/pull/134053
* https://github.com/rust-lang/rust/pull/130287

et al

As always, it's easier to review the commits one at a time. Don't use the Files Changed tab. It's confusing.
This commit is contained in:
Jacob Pratt 2025-01-31 00:25:35 -05:00 committed by GitHub
commit 1a5ebc9e52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 79 additions and 32 deletions

View file

@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/issues/104145
//@ check-pass
// Doc links in `Trait`'s methods are resolved because it has a local impl.
//@ aux-build:issue-103463-aux.rs

View file

@ -1,3 +1,6 @@
// 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.
//@ aux-build:issue-103463-aux.rs

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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;

View file

@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/76736
//@ aux-build:issue-76736-1.rs
//@ aux-build:issue-76736-2.rs

View file

@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/76736
//@ aux-build:issue-76736-1.rs
//@ aux-build:issue-76736-2.rs

View file

@ -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

View file

@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/76736
//@ aux-build:issue-76736-1.rs
//@ aux-build:issue-76736-2.rs

View file

@ -1,3 +1,4 @@
// https://github.com/rust-lang/rust/issues/24183
#![crate_type = "lib"]
#![crate_name = "usr"]

View file

@ -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;
}

View file

@ -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;

View file

@ -1,3 +1,5 @@
// https://github.com/rust-lang/rust/issues/82209
#![crate_name = "foo"]
#![deny(rustdoc::broken_intra_doc_links)]
pub enum Foo {

View file

@ -1,3 +1,6 @@
// https://github.com/rust-lang/rust/pull/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;

View file

@ -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]