Skip to content

Commit d98c470

Browse files
authored
Rollup merge of #125382 - notriddle:notriddle/issue-d, r=fmease
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 7) Follow up * #116214 * #116432 * #116824 * #118105 * #119561 * #123574 As always, it's easier to review the commits one at a time. Don't use the Files Changed tab. It's confusing.
2 parents c7d4c54 + b5923a9 commit d98c470

26 files changed

+80
-51
lines changed

tests/rustdoc/issue-95633.rs renamed to tests/rustdoc-ui/pub-use-primitive-document-private-items-95633.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
//@ check-pass
12
//@ compile-flags: --document-private-items
23

34
// This ensures that no ICE is triggered when rustdoc is run on this code.
5+
// https://github.com/rust-lang/rust/issues/95633
46

57
mod stdlib {
68
pub (crate) use std::i8;

tests/rustdoc/issue-82465-asref-for-and-of-local.rs renamed to tests/rustdoc/asref-for-and-of-local-82465.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// https://github.com/rust-lang/rust/issues/82465
2+
#![crate_name = "foo"]
3+
14
use std::convert::AsRef;
25
pub struct Local;
36

4-
// @has issue_82465_asref_for_and_of_local/struct.Local.html '//h3[@class="code-header"]' 'impl AsRef<str> for Local'
7+
// @has foo/struct.Local.html '//h3[@class="code-header"]' 'impl AsRef<str> for Local'
58
impl AsRef<str> for Local {
69
fn as_ref(&self) -> &str {
710
todo!()

tests/rustdoc/issue-88600.rs renamed to tests/rustdoc/enum-variant-doc-hidden-field-88600.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
// This test ensure that #[doc(hidden)] is applied correctly in enum variant fields.
2+
// https://github.com/rust-lang/rust/issues/88600
3+
#![crate_name = "foo"]
24

35
// Denotes a field which should be hidden.
46
pub struct H;
57

68
// Denotes a field which should not be hidden (shown).
79
pub struct S;
810

9-
// @has issue_88600/enum.FooEnum.html
11+
// @has foo/enum.FooEnum.html
1012
pub enum FooEnum {
1113
// @has - '//*[@id="variant.HiddenTupleItem"]//h3' 'HiddenTupleItem(/* private fields */)'
1214
// @count - '//*[@id="variant.HiddenTupleItem.field.0"]' 0

tests/rustdoc/issue-89309-heading-levels.rs renamed to tests/rustdoc/heading-levels-89309.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/89309
12
#![crate_name = "foo"]
23

34
// @has foo/trait.Read.html

tests/rustdoc/issue-85454.rs renamed to tests/rustdoc/inline_cross/qpath-self-85454.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//@ aux-build:issue-85454.rs
22
//@ build-aux-docs
33
#![crate_name = "foo"]
4+
// https://github.com/rust-lang/rust/issues/85454
45

56
extern crate issue_85454;
67

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//@ aux-build:reexport-with-anonymous-lifetime-98697.rs
2+
//@ ignore-cross-compile
3+
#![crate_name = "foo"]
4+
5+
// When reexporting a function with a HRTB with anonymous lifetimes,
6+
// make sure the anonymous lifetimes are not rendered.
7+
//
8+
// https://github.com/rust-lang/rust/issues/98697
9+
10+
extern crate reexport_with_anonymous_lifetime_98697;
11+
12+
// @has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'fn repro<F>()where F: Fn(&str)'
13+
// @!has foo/fn.repro.html '//pre[@class="rust item-decl"]/code' 'for<'
14+
pub use reexport_with_anonymous_lifetime_98697::repro;
15+
16+
// @has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl MyTrait<&Extra> for Extra'
17+
// @!has foo/struct.Extra.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl<'
18+
pub use reexport_with_anonymous_lifetime_98697::Extra;

tests/rustdoc/issue-94183-blanket-impl-reexported-trait.rs renamed to tests/rustdoc/inline_local/blanket-impl-reexported-trait-94183.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// This test ensures that a publicly re-exported private trait will
33
// appear in the blanket impl list.
44

5+
// https://github.com/rust-lang/rust/issues/94183
56
#![crate_name = "foo"]
67

78
// @has 'foo/struct.S.html'

tests/rustdoc/issue-81141-private-reexport-in-public-api-2.rs renamed to tests/rustdoc/inline_local/private-reexport-in-public-api-81141-2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ edition:2015
22

3+
// https://github.com/rust-lang/rust/issues/81141
34
#![crate_name = "foo"]
45

56
use external::Public as Private;

0 commit comments

Comments
 (0)