Skip to content

Commit e280ae8

Browse files
committed
x.py test --bless
1 parent 7888406 commit e280ae8

4 files changed

+93
-93
lines changed

src/test/rustdoc-ui/doc-without-codeblock.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ note: the lint level is defined here
1616
LL | #![deny(missing_doc_code_examples)]
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1818

19-
error: missing code example in this documentation
20-
--> $DIR/doc-without-codeblock.rs:3:1
21-
|
22-
LL | /// Some docs.
23-
| ^^^^^^^^^^^^^^
24-
2519
error: missing code example in this documentation
2620
--> $DIR/doc-without-codeblock.rs:7:1
2721
|
@@ -34,5 +28,11 @@ error: missing code example in this documentation
3428
LL | /// Or maybe not because she saved herself!
3529
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3630

31+
error: missing code example in this documentation
32+
--> $DIR/doc-without-codeblock.rs:3:1
33+
|
34+
LL | /// Some docs.
35+
| ^^^^^^^^^^^^^^
36+
3737
error: aborting due to 4 previous errors
3838

src/test/rustdoc-ui/intra-links-ambiguity.stderr

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
1-
error: `ambiguous` is both a struct and a function
2-
--> $DIR/intra-links-ambiguity.rs:27:6
1+
error: `true` is both a module and a builtin type
2+
--> $DIR/intra-links-ambiguity.rs:38:6
33
|
4-
LL | /// [`ambiguous`] is ambiguous.
5-
| ^^^^^^^^^^^ ambiguous link
4+
LL | /// [true]
5+
| ^^^^ ambiguous link
66
|
77
note: the lint level is defined here
88
--> $DIR/intra-links-ambiguity.rs:1:9
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
12+
help: to link to the module, prefix with `mod@`
13+
|
14+
LL | /// [mod@true]
15+
| ^^^^^^^^
16+
help: to link to the builtin type, prefix with `prim@`
17+
|
18+
LL | /// [prim@true]
19+
| ^^^^^^^^^
20+
21+
error: `ambiguous` is both a struct and a function
22+
--> $DIR/intra-links-ambiguity.rs:27:6
23+
|
24+
LL | /// [`ambiguous`] is ambiguous.
25+
| ^^^^^^^^^^^ ambiguous link
26+
|
1227
help: to link to the struct, prefix with `struct@`
1328
|
1429
LL | /// [`struct@ambiguous`] is ambiguous.
@@ -82,20 +97,5 @@ help: to link to the function, add parentheses
8297
LL | /// Ambiguous non-implied shortcut link [`foo::bar()`].
8398
| ^^^^^^^^^^^^
8499

85-
error: `true` is both a module and a builtin type
86-
--> $DIR/intra-links-ambiguity.rs:38:6
87-
|
88-
LL | /// [true]
89-
| ^^^^ ambiguous link
90-
|
91-
help: to link to the module, prefix with `mod@`
92-
|
93-
LL | /// [mod@true]
94-
| ^^^^^^^^
95-
help: to link to the builtin type, prefix with `prim@`
96-
|
97-
LL | /// [prim@true]
98-
| ^^^^^^^^^
99-
100100
error: aborting due to 6 previous errors
101101

src/test/rustdoc-ui/intra-links-warning.stderr

+54-54
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,60 @@ warning: unresolved link to `Qux::Z`
3636
LL | //! , [Uniooon::X] and [Qux::Z].
3737
| ^^^^^^ no item named `Qux` in scope
3838

39+
warning: unresolved link to `BarA`
40+
--> $DIR/intra-links-warning.rs:21:10
41+
|
42+
LL | /// bar [BarA] bar
43+
| ^^^^ no item named `BarA` in scope
44+
|
45+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
46+
47+
warning: unresolved link to `BarB`
48+
--> $DIR/intra-links-warning.rs:27:9
49+
|
50+
LL | * bar [BarB] bar
51+
| ^^^^ no item named `BarB` in scope
52+
|
53+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
54+
55+
warning: unresolved link to `BarC`
56+
--> $DIR/intra-links-warning.rs:34:6
57+
|
58+
LL | bar [BarC] bar
59+
| ^^^^ no item named `BarC` in scope
60+
|
61+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
62+
63+
warning: unresolved link to `BarD`
64+
--> $DIR/intra-links-warning.rs:45:1
65+
|
66+
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
67+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68+
|
69+
= note: the link appears in this line:
70+
71+
bar [BarD] bar
72+
^^^^
73+
= note: no item named `BarD` in scope
74+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
75+
76+
warning: unresolved link to `BarF`
77+
--> $DIR/intra-links-warning.rs:50:9
78+
|
79+
LL | #[doc = $f]
80+
| ^^^^^^^^^^^
81+
...
82+
LL | f!("Foo\nbar [BarF] bar\nbaz");
83+
| ------------------------------- in this macro invocation
84+
|
85+
= note: the link appears in this line:
86+
87+
bar [BarF] bar
88+
^^^^
89+
= note: no item named `BarF` in scope
90+
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
91+
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
92+
3993
warning: unresolved link to `Qux:Y`
4094
--> $DIR/intra-links-warning.rs:14:13
4195
|
@@ -117,59 +171,5 @@ LL | /// docs [error2]
117171
|
118172
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
119173

120-
warning: unresolved link to `BarA`
121-
--> $DIR/intra-links-warning.rs:21:10
122-
|
123-
LL | /// bar [BarA] bar
124-
| ^^^^ no item named `BarA` in scope
125-
|
126-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
127-
128-
warning: unresolved link to `BarB`
129-
--> $DIR/intra-links-warning.rs:27:9
130-
|
131-
LL | * bar [BarB] bar
132-
| ^^^^ no item named `BarB` in scope
133-
|
134-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
135-
136-
warning: unresolved link to `BarC`
137-
--> $DIR/intra-links-warning.rs:34:6
138-
|
139-
LL | bar [BarC] bar
140-
| ^^^^ no item named `BarC` in scope
141-
|
142-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
143-
144-
warning: unresolved link to `BarD`
145-
--> $DIR/intra-links-warning.rs:45:1
146-
|
147-
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
148-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149-
|
150-
= note: the link appears in this line:
151-
152-
bar [BarD] bar
153-
^^^^
154-
= note: no item named `BarD` in scope
155-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
156-
157-
warning: unresolved link to `BarF`
158-
--> $DIR/intra-links-warning.rs:50:9
159-
|
160-
LL | #[doc = $f]
161-
| ^^^^^^^^^^^
162-
...
163-
LL | f!("Foo\nbar [BarF] bar\nbaz");
164-
| ------------------------------- in this macro invocation
165-
|
166-
= note: the link appears in this line:
167-
168-
bar [BarF] bar
169-
^^^^
170-
= note: no item named `BarF` in scope
171-
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
172-
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
173-
174174
warning: 19 warnings emitted
175175

Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
error: missing code example in this documentation
2-
--> $DIR/lint-missing-doc-code-example.rs:49:1
2+
--> $DIR/lint-missing-doc-code-example.rs:19:1
33
|
4-
LL | /// Doc
5-
| ^^^^^^^
4+
LL | / mod module1 {
5+
LL | | }
6+
| |_^
67
|
78
note: the lint level is defined here
89
--> $DIR/lint-missing-doc-code-example.rs:2:9
@@ -11,29 +12,28 @@ LL | #![deny(missing_doc_code_examples)]
1112
| ^^^^^^^^^^^^^^^^^^^^^^^^^
1213

1314
error: missing code example in this documentation
14-
--> $DIR/lint-missing-doc-code-example.rs:63:1
15+
--> $DIR/lint-missing-doc-code-example.rs:37:3
1516
|
16-
LL | /// Doc
17-
| ^^^^^^^
17+
LL | /// doc
18+
| ^^^^^^^
1819

1920
error: missing code example in this documentation
20-
--> $DIR/lint-missing-doc-code-example.rs:56:1
21+
--> $DIR/lint-missing-doc-code-example.rs:49:1
2122
|
2223
LL | /// Doc
2324
| ^^^^^^^
2425

2526
error: missing code example in this documentation
26-
--> $DIR/lint-missing-doc-code-example.rs:19:1
27+
--> $DIR/lint-missing-doc-code-example.rs:56:1
2728
|
28-
LL | / mod module1 {
29-
LL | | }
30-
| |_^
29+
LL | /// Doc
30+
| ^^^^^^^
3131

3232
error: missing code example in this documentation
33-
--> $DIR/lint-missing-doc-code-example.rs:37:3
33+
--> $DIR/lint-missing-doc-code-example.rs:63:1
3434
|
35-
LL | /// doc
36-
| ^^^^^^^
35+
LL | /// Doc
36+
| ^^^^^^^
3737

3838
error: aborting due to 5 previous errors
3939

0 commit comments

Comments
 (0)