Skip to content

Commit 872acb0

Browse files
committedNov 29, 2020
Move src/test/rustdoc-ui intra-doc tests into a subdirectory
This also changes the builder to allow using `x.py test src/test/rustdoc-ui/intra-doc`; before, it would panic that no paths were found.
·
1.87.01.50.0
1 parent ddfb581 commit 872acb0

30 files changed

+98
-129
lines changed
 

‎src/bootstrap/test.rs

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -688,38 +688,6 @@ impl Step for RustdocJSNotStd {
688688
}
689689
}
690690

691-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
692-
pub struct RustdocUi {
693-
pub target: TargetSelection,
694-
pub compiler: Compiler,
695-
}
696-
697-
impl Step for RustdocUi {
698-
type Output = ();
699-
const DEFAULT: bool = true;
700-
const ONLY_HOSTS: bool = true;
701-
702-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
703-
run.path("src/test/rustdoc-ui")
704-
}
705-
706-
fn make_run(run: RunConfig<'_>) {
707-
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
708-
run.builder.ensure(RustdocUi { target: run.target, compiler });
709-
}
710-
711-
fn run(self, builder: &Builder<'_>) {
712-
builder.ensure(Compiletest {
713-
compiler: self.compiler,
714-
target: self.target,
715-
mode: "ui",
716-
suite: "rustdoc-ui",
717-
path: "src/test/rustdoc-ui",
718-
compare_mode: None,
719-
})
720-
}
721-
}
722-
723691
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
724692
pub struct Tidy;
725693

@@ -934,6 +902,7 @@ default_test!(Debuginfo { path: "src/test/debuginfo", mode: "debuginfo", suite:
934902
host_test!(UiFullDeps { path: "src/test/ui-fulldeps", mode: "ui", suite: "ui-fulldeps" });
935903

936904
host_test!(Rustdoc { path: "src/test/rustdoc", mode: "rustdoc", suite: "rustdoc" });
905+
host_test!(RustdocUi { path: "src/test/rustdoc-ui", mode: "ui", suite: "rustdoc-ui" });
937906

938907
host_test!(Pretty { path: "src/test/pretty", mode: "pretty", suite: "pretty" });
939908

‎src/test/rustdoc-ui/.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
warning-crlf.rs eol=crlf

‎src/test/rustdoc-ui/intra-doc-alias-ice.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/alias-ice.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: unresolved link to `TypeAlias::hoge`
2-
--> $DIR/intra-doc-alias-ice.rs:5:30
2+
--> $DIR/alias-ice.rs:5:30
33
|
44
LL | /// [broken cross-reference](TypeAlias::hoge)
55
| ^^^^^^^^^^^^^^^ the type alias `TypeAlias` has no associated item named `hoge`
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-doc-alias-ice.rs:1:9
8+
--> $DIR/alias-ice.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^

‎src/test/rustdoc-ui/intra-links-ambiguity.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/ambiguity.stderr

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: `true` is both a module and a builtin type
2-
--> $DIR/intra-links-ambiguity.rs:38:6
2+
--> $DIR/ambiguity.rs:38:6
33
|
44
LL | /// [true]
55
| ^^^^ ambiguous link
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-links-ambiguity.rs:1:9
8+
--> $DIR/ambiguity.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | /// [prim@true]
1919
| ^^^^^^^^^
2020

2121
error: `ambiguous` is both a struct and a function
22-
--> $DIR/intra-links-ambiguity.rs:27:6
22+
--> $DIR/ambiguity.rs:27:6
2323
|
2424
LL | /// [`ambiguous`] is ambiguous.
2525
| ^^^^^^^^^^^ ambiguous link
@@ -34,7 +34,7 @@ LL | /// [`ambiguous()`] is ambiguous.
3434
| ^^^^^^^^^^^^^
3535

3636
error: `ambiguous` is both a struct and a function
37-
--> $DIR/intra-links-ambiguity.rs:29:6
37+
--> $DIR/ambiguity.rs:29:6
3838
|
3939
LL | /// [ambiguous] is ambiguous.
4040
| ^^^^^^^^^ ambiguous link
@@ -49,7 +49,7 @@ LL | /// [ambiguous()] is ambiguous.
4949
| ^^^^^^^^^^^
5050

5151
error: `multi_conflict` is a struct, a function, and a macro
52-
--> $DIR/intra-links-ambiguity.rs:31:6
52+
--> $DIR/ambiguity.rs:31:6
5353
|
5454
LL | /// [`multi_conflict`] is a three-way conflict.
5555
| ^^^^^^^^^^^^^^^^ ambiguous link
@@ -68,7 +68,7 @@ LL | /// [`multi_conflict!`] is a three-way conflict.
6868
| ^^^^^^^^^^^^^^^^^
6969

7070
error: `type_and_value` is both a module and a constant
71-
--> $DIR/intra-links-ambiguity.rs:33:16
71+
--> $DIR/ambiguity.rs:33:16
7272
|
7373
LL | /// Ambiguous [type_and_value].
7474
| ^^^^^^^^^^^^^^ ambiguous link
@@ -83,7 +83,7 @@ LL | /// Ambiguous [const@type_and_value].
8383
| ^^^^^^^^^^^^^^^^^^^^
8484

8585
error: `foo::bar` is both an enum and a function
86-
--> $DIR/intra-links-ambiguity.rs:35:42
86+
--> $DIR/ambiguity.rs:35:42
8787
|
8888
LL | /// Ambiguous non-implied shortcut link [`foo::bar`].
8989
| ^^^^^^^^^^ ambiguous link

‎src/test/rustdoc-ui/intra-links-anchors.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/anchors.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
error: `Foo::f#hola` contains an anchor, but links to fields are already anchored
2-
--> $DIR/intra-links-anchors.rs:25:15
2+
--> $DIR/anchors.rs:25:15
33
|
44
LL | /// Or maybe [Foo::f#hola].
55
| ^^^^^^^^^^^ contains invalid anchor
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-links-anchors.rs:1:9
8+
--> $DIR/anchors.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: `hello#people#!` contains multiple anchors
14-
--> $DIR/intra-links-anchors.rs:31:28
14+
--> $DIR/anchors.rs:31:28
1515
|
1616
LL | /// Another anchor error: [hello#people#!].
1717
| ^^^^^^^^^^^^^^ contains invalid anchor
1818

1919
error: `Enum::A#whatever` contains an anchor, but links to variants are already anchored
20-
--> $DIR/intra-links-anchors.rs:37:28
20+
--> $DIR/anchors.rs:37:28
2121
|
2222
LL | /// Damn enum's variants: [Enum::A#whatever].
2323
| ^^^^^^^^^^^^^^^^ contains invalid anchor
2424

2525
error: `u32#hello` contains an anchor, but links to builtin types are already anchored
26-
--> $DIR/intra-links-anchors.rs:43:6
26+
--> $DIR/anchors.rs:43:6
2727
|
2828
LL | /// [u32#hello]
2929
| ^^^^^^^^^ contains invalid anchor

‎src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/disambiguator-mismatch.stderr

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,90 @@
11
error: incompatible link kind for `S`
2-
--> $DIR/intra-links-disambiguator-mismatch.rs:14:14
2+
--> $DIR/disambiguator-mismatch.rs:14:14
33
|
44
LL | /// Link to [struct@S]
55
| ^^^^^^^^ help: to link to the enum, prefix with `enum@`: `enum@S`
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-links-disambiguator-mismatch.rs:1:9
8+
--> $DIR/disambiguator-mismatch.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
1212
= note: this link resolved to an enum, which is not a struct
1313

1414
error: incompatible link kind for `S`
15-
--> $DIR/intra-links-disambiguator-mismatch.rs:19:14
15+
--> $DIR/disambiguator-mismatch.rs:19:14
1616
|
1717
LL | /// Link to [mod@S]
1818
| ^^^^^ help: to link to the enum, prefix with `enum@`: `enum@S`
1919
|
2020
= note: this link resolved to an enum, which is not a module
2121

2222
error: incompatible link kind for `S`
23-
--> $DIR/intra-links-disambiguator-mismatch.rs:24:14
23+
--> $DIR/disambiguator-mismatch.rs:24:14
2424
|
2525
LL | /// Link to [union@S]
2626
| ^^^^^^^ help: to link to the enum, prefix with `enum@`: `enum@S`
2727
|
2828
= note: this link resolved to an enum, which is not a union
2929

3030
error: incompatible link kind for `S`
31-
--> $DIR/intra-links-disambiguator-mismatch.rs:29:14
31+
--> $DIR/disambiguator-mismatch.rs:29:14
3232
|
3333
LL | /// Link to [trait@S]
3434
| ^^^^^^^ help: to link to the enum, prefix with `enum@`: `enum@S`
3535
|
3636
= note: this link resolved to an enum, which is not a trait
3737

3838
error: incompatible link kind for `T`
39-
--> $DIR/intra-links-disambiguator-mismatch.rs:34:14
39+
--> $DIR/disambiguator-mismatch.rs:34:14
4040
|
4141
LL | /// Link to [struct@T]
4242
| ^^^^^^^^ help: to link to the trait, prefix with `trait@`: `trait@T`
4343
|
4444
= note: this link resolved to a trait, which is not a struct
4545

4646
error: incompatible link kind for `m`
47-
--> $DIR/intra-links-disambiguator-mismatch.rs:39:14
47+
--> $DIR/disambiguator-mismatch.rs:39:14
4848
|
4949
LL | /// Link to [derive@m]
5050
| ^^^^^^^^ help: to link to the macro, add an exclamation mark: `m!`
5151
|
5252
= note: this link resolved to a macro, which is not a derive macro
5353

5454
error: incompatible link kind for `s`
55-
--> $DIR/intra-links-disambiguator-mismatch.rs:44:14
55+
--> $DIR/disambiguator-mismatch.rs:44:14
5656
|
5757
LL | /// Link to [const@s]
5858
| ^^^^^^^ help: to link to the static, prefix with `static@`: `static@s`
5959
|
6060
= note: this link resolved to a static, which is not a constant
6161

6262
error: incompatible link kind for `c`
63-
--> $DIR/intra-links-disambiguator-mismatch.rs:49:14
63+
--> $DIR/disambiguator-mismatch.rs:49:14
6464
|
6565
LL | /// Link to [static@c]
6666
| ^^^^^^^^ help: to link to the constant, prefix with `const@`: `const@c`
6767
|
6868
= note: this link resolved to a constant, which is not a static
6969

7070
error: incompatible link kind for `c`
71-
--> $DIR/intra-links-disambiguator-mismatch.rs:54:14
71+
--> $DIR/disambiguator-mismatch.rs:54:14
7272
|
7373
LL | /// Link to [fn@c]
7474
| ^^^^ help: to link to the constant, prefix with `const@`: `const@c`
7575
|
7676
= note: this link resolved to a constant, which is not a function
7777

7878
error: incompatible link kind for `c`
79-
--> $DIR/intra-links-disambiguator-mismatch.rs:59:14
79+
--> $DIR/disambiguator-mismatch.rs:59:14
8080
|
8181
LL | /// Link to [c()]
8282
| ^^^ help: to link to the constant, prefix with `const@`: `const@c`
8383
|
8484
= note: this link resolved to a constant, which is not a function
8585

8686
error: incompatible link kind for `f`
87-
--> $DIR/intra-links-disambiguator-mismatch.rs:64:14
87+
--> $DIR/disambiguator-mismatch.rs:64:14
8888
|
8989
LL | /// Link to [const@f]
9090
| ^^^^^^^ help: to link to the function, add parentheses: `f()`

‎src/test/rustdoc-ui/intra-link-double-anchor.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/double-anchor.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: `with#anchor#error` contains multiple anchors
2-
--> $DIR/intra-link-double-anchor.rs:5:18
2+
--> $DIR/double-anchor.rs:5:18
33
|
44
LL | /// docs [label][with#anchor#error]
55
| ^^^^^^^^^^^^^^^^^ contains invalid anchor

‎src/test/rustdoc-ui/intra-link-errors.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/errors.stderr

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,95 +1,95 @@
11
error: unresolved link to `path::to::nonexistent::module`
2-
--> $DIR/intra-link-errors.rs:7:6
2+
--> $DIR/errors.rs:7:6
33
|
44
LL | /// [path::to::nonexistent::module]
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-link-errors.rs:1:9
8+
--> $DIR/errors.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: unresolved link to `path::to::nonexistent::macro`
14-
--> $DIR/intra-link-errors.rs:11:6
14+
--> $DIR/errors.rs:11:6
1515
|
1616
LL | /// [path::to::nonexistent::macro!]
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope
1818

1919
error: unresolved link to `path::to::nonexistent::type`
20-
--> $DIR/intra-link-errors.rs:15:6
20+
--> $DIR/errors.rs:15:6
2121
|
2222
LL | /// [type@path::to::nonexistent::type]
2323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `path` in scope
2424

2525
error: unresolved link to `std::io::not::here`
26-
--> $DIR/intra-link-errors.rs:19:6
26+
--> $DIR/errors.rs:19:6
2727
|
2828
LL | /// [std::io::not::here]
2929
| ^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`
3030

3131
error: unresolved link to `std::io::not::here`
32-
--> $DIR/intra-link-errors.rs:23:6
32+
--> $DIR/errors.rs:23:6
3333
|
3434
LL | /// [type@std::io::not::here]
3535
| ^^^^^^^^^^^^^^^^^^^^^^^ no item named `not` in module `io`
3636

3737
error: unresolved link to `std::io::Error::x`
38-
--> $DIR/intra-link-errors.rs:27:6
38+
--> $DIR/errors.rs:27:6
3939
|
4040
LL | /// [std::io::Error::x]
4141
| ^^^^^^^^^^^^^^^^^ the struct `Error` has no field or associated item named `x`
4242

4343
error: unresolved link to `std::io::ErrorKind::x`
44-
--> $DIR/intra-link-errors.rs:31:6
44+
--> $DIR/errors.rs:31:6
4545
|
4646
LL | /// [std::io::ErrorKind::x]
4747
| ^^^^^^^^^^^^^^^^^^^^^ the enum `ErrorKind` has no variant or associated item named `x`
4848

4949
error: unresolved link to `f::A`
50-
--> $DIR/intra-link-errors.rs:35:6
50+
--> $DIR/errors.rs:35:6
5151
|
5252
LL | /// [f::A]
5353
| ^^^^ `f` is a function, not a module or type, and cannot have associated items
5454

5555
error: unresolved link to `f::A`
56-
--> $DIR/intra-link-errors.rs:39:6
56+
--> $DIR/errors.rs:39:6
5757
|
5858
LL | /// [f::A!]
5959
| ^^^^^ `f` is a function, not a module or type, and cannot have associated items
6060

6161
error: unresolved link to `S::A`
62-
--> $DIR/intra-link-errors.rs:43:6
62+
--> $DIR/errors.rs:43:6
6363
|
6464
LL | /// [S::A]
6565
| ^^^^ the struct `S` has no field or associated item named `A`
6666

6767
error: unresolved link to `S::fmt`
68-
--> $DIR/intra-link-errors.rs:47:6
68+
--> $DIR/errors.rs:47:6
6969
|
7070
LL | /// [S::fmt]
7171
| ^^^^^^ the struct `S` has no field or associated item named `fmt`
7272

7373
error: unresolved link to `E::D`
74-
--> $DIR/intra-link-errors.rs:51:6
74+
--> $DIR/errors.rs:51:6
7575
|
7676
LL | /// [E::D]
7777
| ^^^^ the enum `E` has no variant or associated item named `D`
7878

7979
error: unresolved link to `u8::not_found`
80-
--> $DIR/intra-link-errors.rs:55:6
80+
--> $DIR/errors.rs:55:6
8181
|
8282
LL | /// [u8::not_found]
8383
| ^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found`
8484

8585
error: unresolved link to `std::primitive::u8::not_found`
86-
--> $DIR/intra-link-errors.rs:59:6
86+
--> $DIR/errors.rs:59:6
8787
|
8888
LL | /// [std::primitive::u8::not_found]
8989
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the builtin type `u8` has no associated item named `not_found`
9090

9191
error: unresolved link to `Vec::into_iter`
92-
--> $DIR/intra-link-errors.rs:63:6
92+
--> $DIR/errors.rs:63:6
9393
|
9494
LL | /// [type@Vec::into_iter]
9595
| ^^^^^^^^^^^^^^^^^^^
@@ -98,7 +98,7 @@ LL | /// [type@Vec::into_iter]
9898
| help: to link to the associated function, add parentheses: `Vec::into_iter()`
9999

100100
error: unresolved link to `S`
101-
--> $DIR/intra-link-errors.rs:68:6
101+
--> $DIR/errors.rs:68:6
102102
|
103103
LL | /// [S!]
104104
| ^^
@@ -107,7 +107,7 @@ LL | /// [S!]
107107
| help: to link to the struct, prefix with `struct@`: `struct@S`
108108

109109
error: unresolved link to `S::h`
110-
--> $DIR/intra-link-errors.rs:78:6
110+
--> $DIR/errors.rs:78:6
111111
|
112112
LL | /// [type@S::h]
113113
| ^^^^^^^^^
@@ -116,7 +116,7 @@ LL | /// [type@S::h]
116116
| help: to link to the associated function, add parentheses: `S::h()`
117117

118118
error: unresolved link to `T::g`
119-
--> $DIR/intra-link-errors.rs:86:6
119+
--> $DIR/errors.rs:86:6
120120
|
121121
LL | /// [type@T::g]
122122
| ^^^^^^^^^
@@ -125,13 +125,13 @@ LL | /// [type@T::g]
125125
| help: to link to the associated function, add parentheses: `T::g()`
126126

127127
error: unresolved link to `T::h`
128-
--> $DIR/intra-link-errors.rs:91:6
128+
--> $DIR/errors.rs:91:6
129129
|
130130
LL | /// [T::h!]
131131
| ^^^^^ the trait `T` has no macro named `h`
132132

133133
error: unresolved link to `m`
134-
--> $DIR/intra-link-errors.rs:98:6
134+
--> $DIR/errors.rs:98:6
135135
|
136136
LL | /// [m()]
137137
| ^^^

‎src/test/rustdoc-ui/intra-link-malformed-generics.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/malformed-generics.stderr

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,97 +1,97 @@
11
error: unresolved link to `Vec<`
2-
--> $DIR/intra-link-malformed-generics.rs:3:6
2+
--> $DIR/malformed-generics.rs:3:6
33
|
44
LL | //! [Vec<]
55
| ^^^^ unbalanced angle brackets
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-link-malformed-generics.rs:1:9
8+
--> $DIR/malformed-generics.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
1212

1313
error: unresolved link to `Vec<Box<T`
14-
--> $DIR/intra-link-malformed-generics.rs:4:6
14+
--> $DIR/malformed-generics.rs:4:6
1515
|
1616
LL | //! [Vec<Box<T]
1717
| ^^^^^^^^^ unbalanced angle brackets
1818

1919
error: unresolved link to `Vec<Box<T>`
20-
--> $DIR/intra-link-malformed-generics.rs:5:6
20+
--> $DIR/malformed-generics.rs:5:6
2121
|
2222
LL | //! [Vec<Box<T>]
2323
| ^^^^^^^^^^ unbalanced angle brackets
2424

2525
error: unresolved link to `Vec<Box<T>>>`
26-
--> $DIR/intra-link-malformed-generics.rs:6:6
26+
--> $DIR/malformed-generics.rs:6:6
2727
|
2828
LL | //! [Vec<Box<T>>>]
2929
| ^^^^^^^^^^^^ unbalanced angle brackets
3030

3131
error: unresolved link to `Vec<T>>>`
32-
--> $DIR/intra-link-malformed-generics.rs:7:6
32+
--> $DIR/malformed-generics.rs:7:6
3333
|
3434
LL | //! [Vec<T>>>]
3535
| ^^^^^^^^ unbalanced angle brackets
3636

3737
error: unresolved link to `<Vec`
38-
--> $DIR/intra-link-malformed-generics.rs:8:6
38+
--> $DIR/malformed-generics.rs:8:6
3939
|
4040
LL | //! [<Vec]
4141
| ^^^^ unbalanced angle brackets
4242

4343
error: unresolved link to `Vec::<`
44-
--> $DIR/intra-link-malformed-generics.rs:9:6
44+
--> $DIR/malformed-generics.rs:9:6
4545
|
4646
LL | //! [Vec::<]
4747
| ^^^^^^ unbalanced angle brackets
4848

4949
error: unresolved link to `<T>`
50-
--> $DIR/intra-link-malformed-generics.rs:10:6
50+
--> $DIR/malformed-generics.rs:10:6
5151
|
5252
LL | //! [<T>]
5353
| ^^^ missing type for generic parameters
5454

5555
error: unresolved link to `<invalid syntax>`
56-
--> $DIR/intra-link-malformed-generics.rs:11:6
56+
--> $DIR/malformed-generics.rs:11:6
5757
|
5858
LL | //! [<invalid syntax>]
5959
| ^^^^^^^^^^^^^^^^ missing type for generic parameters
6060

6161
error: unresolved link to `Vec:<T>:new`
62-
--> $DIR/intra-link-malformed-generics.rs:12:6
62+
--> $DIR/malformed-generics.rs:12:6
6363
|
6464
LL | //! [Vec:<T>:new()]
6565
| ^^^^^^^^^^^^^ has invalid path separator
6666

6767
error: unresolved link to `Vec<<T>>`
68-
--> $DIR/intra-link-malformed-generics.rs:13:6
68+
--> $DIR/malformed-generics.rs:13:6
6969
|
7070
LL | //! [Vec<<T>>]
7171
| ^^^^^^^^ too many angle brackets
7272

7373
error: unresolved link to `Vec<>`
74-
--> $DIR/intra-link-malformed-generics.rs:14:6
74+
--> $DIR/malformed-generics.rs:14:6
7575
|
7676
LL | //! [Vec<>]
7777
| ^^^^^ empty angle brackets
7878

7979
error: unresolved link to `Vec<<>>`
80-
--> $DIR/intra-link-malformed-generics.rs:15:6
80+
--> $DIR/malformed-generics.rs:15:6
8181
|
8282
LL | //! [Vec<<>>]
8383
| ^^^^^^^ too many angle brackets
8484

8585
error: unresolved link to `<Vec as IntoIterator>::into_iter`
86-
--> $DIR/intra-link-malformed-generics.rs:18:6
86+
--> $DIR/malformed-generics.rs:18:6
8787
|
8888
LL | //! [<Vec as IntoIterator>::into_iter]
8989
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported
9090
|
9191
= note: see https://github.com/rust-lang/rust/issues/74563 for more information
9292

9393
error: unresolved link to `<Vec<T> as IntoIterator>::iter`
94-
--> $DIR/intra-link-malformed-generics.rs:19:6
94+
--> $DIR/malformed-generics.rs:19:6
9595
|
9696
LL | //! [<Vec<T> as IntoIterator>::iter]
9797
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported

‎src/test/rustdoc-ui/intra-link-prim-conflict.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/prim-conflict.stderr

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: `char` is both a module and a builtin type
2-
--> $DIR/intra-link-prim-conflict.rs:4:6
2+
--> $DIR/prim-conflict.rs:4:6
33
|
44
LL | /// [char]
55
| ^^^^ ambiguous link
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-link-prim-conflict.rs:1:9
8+
--> $DIR/prim-conflict.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -19,7 +19,7 @@ LL | /// [prim@char]
1919
| ^^^^^^^^^
2020

2121
error: `char` is both a module and a builtin type
22-
--> $DIR/intra-link-prim-conflict.rs:10:6
22+
--> $DIR/prim-conflict.rs:10:6
2323
|
2424
LL | /// [type@char]
2525
| ^^^^^^^^^ ambiguous link
@@ -34,15 +34,15 @@ LL | /// [prim@char]
3434
| ^^^^^^^^^
3535

3636
error: incompatible link kind for `char`
37-
--> $DIR/intra-link-prim-conflict.rs:19:6
37+
--> $DIR/prim-conflict.rs:19:6
3838
|
3939
LL | /// [struct@char]
4040
| ^^^^^^^^^^^ help: to link to the module, prefix with `mod@`: `mod@char`
4141
|
4242
= note: this link resolved to a module, which is not a struct
4343

4444
error: incompatible link kind for `char`
45-
--> $DIR/intra-link-prim-conflict.rs:26:10
45+
--> $DIR/prim-conflict.rs:26:10
4646
|
4747
LL | //! [struct@char]
4848
| ^^^^^^^^^^^ help: to link to the builtin type, prefix with `prim@`: `prim@char`

‎src/test/rustdoc-ui/intra-links-private.private.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/private.private.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: public documentation for `DocMe` links to private item `DontDocMe`
2-
--> $DIR/intra-links-private.rs:5:11
2+
--> $DIR/private.rs:5:11
33
|
44
LL | /// docs [DontDocMe]
55
| ^^^^^^^^^ this item is private

‎src/test/rustdoc-ui/intra-links-private.public.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/private.public.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: public documentation for `DocMe` links to private item `DontDocMe`
2-
--> $DIR/intra-links-private.rs:5:11
2+
--> $DIR/private.rs:5:11
33
|
44
LL | /// docs [DontDocMe]
55
| ^^^^^^^^^ this item is private

‎src/test/rustdoc-ui/intra-link-span-ice-55723.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
error: unresolved link to `i`
2-
--> $DIR/intra-link-span-ice-55723.rs:9:10
2+
--> $DIR/span-ice-55723.rs:9:10
33
|
44
LL | /// (arr[i])
55
| ^ no item named `i` in scope
66
|
77
note: the lint level is defined here
8-
--> $DIR/intra-link-span-ice-55723.rs:1:9
8+
--> $DIR/span-ice-55723.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^

‎src/test/rustdoc-ui/intra-links-warning-crlf.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/warning-crlf.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
warning: unresolved link to `error`
2-
--> $DIR/intra-links-warning-crlf.rs:7:6
2+
--> $DIR/warning-crlf.rs:7:6
33
|
44
LL | /// [error]
55
| ^^^^^ no item named `error` in scope
@@ -8,23 +8,23 @@ LL | /// [error]
88
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
99

1010
warning: unresolved link to `error1`
11-
--> $DIR/intra-links-warning-crlf.rs:12:11
11+
--> $DIR/warning-crlf.rs:12:11
1212
|
1313
LL | /// docs [error1]
1414
| ^^^^^^ no item named `error1` in scope
1515
|
1616
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
1717

1818
warning: unresolved link to `error2`
19-
--> $DIR/intra-links-warning-crlf.rs:15:11
19+
--> $DIR/warning-crlf.rs:15:11
2020
|
2121
LL | /// docs [error2]
2222
| ^^^^^^ no item named `error2` in scope
2323
|
2424
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
2525

2626
warning: unresolved link to `error`
27-
--> $DIR/intra-links-warning-crlf.rs:23:20
27+
--> $DIR/warning-crlf.rs:23:20
2828
|
2929
LL | * It also has an [error].
3030
| ^^^^^ no item named `error` in scope

‎src/test/rustdoc-ui/intra-links-warning.stderr renamed to ‎src/test/rustdoc-ui/intra-doc/warning.stderr

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,75 @@
11
warning: unresolved link to `Foo::baz`
2-
--> $DIR/intra-links-warning.rs:3:23
2+
--> $DIR/warning.rs:3:23
33
|
44
LL | //! Test with [Foo::baz], [Bar::foo], ...
55
| ^^^^^^^^ the struct `Foo` has no field or associated item named `baz`
66
|
77
= note: `#[warn(broken_intra_doc_links)]` on by default
88

99
warning: unresolved link to `Bar::foo`
10-
--> $DIR/intra-links-warning.rs:3:35
10+
--> $DIR/warning.rs:3:35
1111
|
1212
LL | //! Test with [Foo::baz], [Bar::foo], ...
1313
| ^^^^^^^^ no item named `Bar` in scope
1414

1515
warning: unresolved link to `Uniooon::X`
16-
--> $DIR/intra-links-warning.rs:6:13
16+
--> $DIR/warning.rs:6:13
1717
|
1818
LL | //! , [Uniooon::X] and [Qux::Z].
1919
| ^^^^^^^^^^ no item named `Uniooon` in scope
2020

2121
warning: unresolved link to `Qux::Z`
22-
--> $DIR/intra-links-warning.rs:6:30
22+
--> $DIR/warning.rs:6:30
2323
|
2424
LL | //! , [Uniooon::X] and [Qux::Z].
2525
| ^^^^^^ no item named `Qux` in scope
2626

2727
warning: unresolved link to `Uniooon::X`
28-
--> $DIR/intra-links-warning.rs:10:14
28+
--> $DIR/warning.rs:10:14
2929
|
3030
LL | //! , [Uniooon::X] and [Qux::Z].
3131
| ^^^^^^^^^^ no item named `Uniooon` in scope
3232

3333
warning: unresolved link to `Qux::Z`
34-
--> $DIR/intra-links-warning.rs:10:31
34+
--> $DIR/warning.rs:10:31
3535
|
3636
LL | //! , [Uniooon::X] and [Qux::Z].
3737
| ^^^^^^ no item named `Qux` in scope
3838

3939
warning: unresolved link to `Qux:Y`
40-
--> $DIR/intra-links-warning.rs:14:13
40+
--> $DIR/warning.rs:14:13
4141
|
4242
LL | /// [Qux:Y]
4343
| ^^^^^ no item named `Qux:Y` in scope
4444
|
4545
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
4646

4747
warning: unresolved link to `BarA`
48-
--> $DIR/intra-links-warning.rs:21:10
48+
--> $DIR/warning.rs:21:10
4949
|
5050
LL | /// bar [BarA] bar
5151
| ^^^^ no item named `BarA` in scope
5252
|
5353
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
5454

5555
warning: unresolved link to `BarB`
56-
--> $DIR/intra-links-warning.rs:27:9
56+
--> $DIR/warning.rs:27:9
5757
|
5858
LL | * bar [BarB] bar
5959
| ^^^^ no item named `BarB` in scope
6060
|
6161
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
6262

6363
warning: unresolved link to `BarC`
64-
--> $DIR/intra-links-warning.rs:34:6
64+
--> $DIR/warning.rs:34:6
6565
|
6666
LL | bar [BarC] bar
6767
| ^^^^ no item named `BarC` in scope
6868
|
6969
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
7070

7171
warning: unresolved link to `BarD`
72-
--> $DIR/intra-links-warning.rs:45:1
72+
--> $DIR/warning.rs:45:1
7373
|
7474
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
7575
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -82,7 +82,7 @@ LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
8282
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
8383

8484
warning: unresolved link to `BarF`
85-
--> $DIR/intra-links-warning.rs:50:9
85+
--> $DIR/warning.rs:50:9
8686
|
8787
LL | #[doc = $f]
8888
| ^^^^^^^^^^^
@@ -99,23 +99,23 @@ LL | f!("Foo\nbar [BarF] bar\nbaz");
9999
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
100100

101101
warning: unresolved link to `error`
102-
--> $DIR/intra-links-warning.rs:58:30
102+
--> $DIR/warning.rs:58:30
103103
|
104104
LL | * time to introduce a link [error]*/
105105
| ^^^^^ no item named `error` in scope
106106
|
107107
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
108108

109109
warning: unresolved link to `error`
110-
--> $DIR/intra-links-warning.rs:64:30
110+
--> $DIR/warning.rs:64:30
111111
|
112112
LL | * time to introduce a link [error]
113113
| ^^^^^ no item named `error` in scope
114114
|
115115
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
116116

117117
warning: unresolved link to `error`
118-
--> $DIR/intra-links-warning.rs:68:1
118+
--> $DIR/warning.rs:68:1
119119
|
120120
LL | #[doc = "single line [error]"]
121121
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -128,7 +128,7 @@ LL | #[doc = "single line [error]"]
128128
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
129129

130130
warning: unresolved link to `error`
131-
--> $DIR/intra-links-warning.rs:71:1
131+
--> $DIR/warning.rs:71:1
132132
|
133133
LL | #[doc = "single line with \"escaping\" [error]"]
134134
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -141,7 +141,7 @@ LL | #[doc = "single line with \"escaping\" [error]"]
141141
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
142142

143143
warning: unresolved link to `error`
144-
--> $DIR/intra-links-warning.rs:74:1
144+
--> $DIR/warning.rs:74:1
145145
|
146146
LL | / /// Item docs.
147147
LL | | #[doc="Hello there!"]
@@ -156,15 +156,15 @@ LL | | /// [error]
156156
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
157157

158158
warning: unresolved link to `error1`
159-
--> $DIR/intra-links-warning.rs:80:11
159+
--> $DIR/warning.rs:80:11
160160
|
161161
LL | /// docs [error1]
162162
| ^^^^^^ no item named `error1` in scope
163163
|
164164
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
165165

166166
warning: unresolved link to `error2`
167-
--> $DIR/intra-links-warning.rs:82:11
167+
--> $DIR/warning.rs:82:11
168168
|
169169
LL | /// docs [error2]
170170
| ^^^^^^ no item named `error2` in scope

0 commit comments

Comments
 (0)
Please sign in to comment.