Skip to content

Commit 1c23c8b

Browse files
authored
Rollup merge of rust-lang#130287 - notriddle:notriddle/issue-d, r=jieyouxu
rustdoc: rename `issue-\d+.rs` tests to have meaningful names (part 9) Follow up * rust-lang#116214 * rust-lang#116432 * rust-lang#116824 * rust-lang#118105 * rust-lang#119561 * rust-lang#123574 * rust-lang#125382 * rust-lang#127671 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 26bda05 + 48c7e44 commit 1c23c8b

22 files changed

+34
-11
lines changed

tests/rustdoc-ui/issue-102467.stderr tests/rustdoc-ui/associated-constant-not-allowed-102467.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0229]: associated item constraints are not allowed here
2-
--> $DIR/issue-102467.rs:7:17
2+
--> $DIR/associated-constant-not-allowed-102467.rs:7:17
33
|
44
LL | type A: S<C<X = 0i32> = 34>;
55
| ^^^^^^^^ associated item constraint not allowed here
@@ -11,7 +11,7 @@ LL + type A: S<C = 34>;
1111
|
1212

1313
error[E0229]: associated item constraints are not allowed here
14-
--> $DIR/issue-102467.rs:7:17
14+
--> $DIR/associated-constant-not-allowed-102467.rs:7:17
1515
|
1616
LL | type A: S<C<X = 0i32> = 34>;
1717
| ^^^^^^^^ associated item constraint not allowed here

tests/rustdoc-ui/issue-110629-private-type-cycle.rs tests/rustdoc-ui/private-type-cycle-110629.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//@ check-pass
2+
// https://github.com/rust-lang/rust/issues/110629
23

34
#![feature(type_alias_impl_trait)]
45

tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.rs tests/rustdoc-ui/private-type-cycle-dyn-110629.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// https://github.com/rust-lang/rust/issues/110629
2+
13
type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
24
//~^ ERROR cycle detected when expanding type alias
35

tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr tests/rustdoc-ui/private-type-cycle-dyn-110629.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0391]: cycle detected when expanding type alias `Bar`
2-
--> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38
2+
--> $DIR/private-type-cycle-dyn-110629.rs:3:38
33
|
44
LL | type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
55
| ^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
99
= help: consider using a struct, enum, or union instead to break the cycle
1010
= help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
1111
note: cycle used when checking that `Bar` is well-formed
12-
--> $DIR/issue-110629-private-type-cycle-dyn.rs:1:1
12+
--> $DIR/private-type-cycle-dyn-110629.rs:3:1
1313
|
1414
LL | type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
1515
| ^^^^^^^^^^^^^^^^

tests/rustdoc/issue-108931-anonymous-reexport.rs tests/rustdoc/anonymous-reexport-108931.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Ensuring that anonymous re-exports are always inlined.
2+
// https://github.com/rust-lang/rust/issues/108931
23

34
#![crate_name = "foo"]
45

tests/rustdoc/issue-109695-crate-doc-hidden.rs tests/rustdoc/crate-doc-hidden-109695.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// This test ensures that even if the crate module is `#[doc(hidden)]`, the file
22
// is generated.
3+
// https://github.com/rust-lang/rust/issues/109695
34

45
//@ has 'foo/index.html'
56
//@ has 'foo/all.html'

tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs tests/rustdoc/deref/sidebar-links-deref-100679.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/100679
12
#![crate_name="foo"]
23

34
pub struct Vec;

tests/rustdoc/issue-113982-doc_auto_cfg-reexport-foreign.rs tests/rustdoc/doc_auto_cfg-reexport-foreign-113982.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//@ aux-build: issue-113982-doc_auto_cfg-reexport-foreign.rs
22

3+
// https://github.com/rust-lang/rust/issues/113982
34
#![feature(no_core, doc_auto_cfg)]
45
#![no_core]
56
#![crate_name = "foo"]

tests/rustdoc/duplicate_impls/issue-33054.rs tests/rustdoc/duplicate_impls/sidebar-links-duplicate-impls-33054.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
// ignore-tidy-linelength
2+
// https://github.com/rust-lang/rust/issues/100679
3+
#![crate_name="foo"]
24

3-
//@ has issue_33054/impls/struct.Foo.html
5+
//@ has foo/impls/struct.Foo.html
46
//@ has - '//h3[@class="code-header"]' 'impl Foo'
57
//@ has - '//h3[@class="code-header"]' 'impl Bar for Foo'
68
//@ count - '//*[@id="trait-implementations-list"]//*[@class="impl"]' 1
79
//@ count - '//*[@id="main-content"]/div[@id="implementations-list"]/details/summary/*[@class="impl"]' 1
8-
//@ has issue_33054/impls/bar/trait.Bar.html
10+
//@ has foo/impls/bar/trait.Bar.html
911
//@ has - '//h3[@class="code-header"]' 'impl Bar for Foo'
1012
//@ count - '//*[@class="struct"]' 1
1113
pub mod impls;
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
//@ has issue_118180_empty_tuple_struct/enum.Enum.html
1+
// https://github.com/rust-lang/rust/issues/118180
2+
#![crate_name="foo"]
3+
4+
//@ has foo/enum.Enum.html
25
pub enum Enum {
36
//@ has - '//*[@id="variant.Empty"]//h3' 'Empty()'
47
Empty(),
58
}
69

7-
//@ has issue_118180_empty_tuple_struct/struct.Empty.html
10+
//@ has foo/struct.Empty.html
811
//@ has - '//pre/code' 'Empty()'
912
pub struct Empty();

tests/rustdoc/issue-108925.rs tests/rustdoc/enum-non-exhaustive-108925.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
//@ has issue_108925/enum.MyThing.html
1+
// https://github.com/rust-lang/rust/issues/108925
2+
#![crate_name="foo"]
3+
4+
//@ has foo/enum.MyThing.html
25
//@ has - '//code' 'Shown'
36
//@ !has - '//code' 'NotShown'
47
//@ !has - '//code' '// some variants omitted'

tests/rustdoc/issue-111249-file-creation.rs tests/rustdoc/file-creation-111249.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/111249
12
#![crate_name = "foo"]
23
#![feature(no_core)]
34
#![no_core]

tests/rustdoc/generic-associated-types/issue-94683.rs tests/rustdoc/generic-associated-types/gat-elided-lifetime-94683.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/94683
12
#![crate_name = "foo"]
23

34
pub trait Trait {

tests/rustdoc/generic-associated-types/issue-109488.rs tests/rustdoc/generic-associated-types/gat-linkification-109488.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Make sure that we escape the arguments of the GAT projection even if we fail to compute
22
// the href of the corresponding trait (in this case it is private).
33
// Further, test that we also linkify the GAT arguments.
4+
// https://github.com/rust-lang/rust/issues/94683
5+
#![crate_name="foo"]
46

5-
//@ has 'issue_109488/type.A.html'
7+
//@ has 'foo/type.A.html'
68
//@ has - '//pre[@class="rust item-decl"]' '<S as Tr>::P<Option<i32>>'
79
//@ has - '//pre[@class="rust item-decl"]//a[@class="enum"]/@href' '{{channel}}/core/option/enum.Option.html'
810
pub type A = <S as Tr>::P<Option<i32>>;

tests/rustdoc/issue-115295-macro-const-display.rs tests/rustdoc/macro-const-display-115295.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// https://github.com/rust-lang/rust/issues/115295
12
#![crate_name = "foo"]
23

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

tests/rustdoc/issue-110629-private-type-cycle.rs tests/rustdoc/private-type-cycle-110629.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
//@ compile-flags: --document-private-items
22

3+
// https://github.com/rust-lang/rust/issues/110629
4+
#![crate_name="foo"]
35
#![feature(type_alias_impl_trait)]
46

57
type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug;
68

7-
//@ has issue_110629_private_type_cycle/type.Bar.html
9+
//@ has foo/type.Bar.html
810
//@ has - '//pre[@class="rust item-decl"]' \
911
// "pub(crate) type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + Debug;"
1012

tests/rustdoc/issue-111064-reexport-trait-from-hidden-2.rs tests/rustdoc/reexport-trait-from-hidden-111064-2.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Regression test for <https://github.com/rust-lang/rust/issues/111064>.
12
#![feature(no_core)]
23
#![no_core]
34
#![crate_name = "foo"]

0 commit comments

Comments
 (0)