Skip to content

Commit fc86385

Browse files
committed
bless more tests
1 parent 1b359d7 commit fc86385

File tree

2 files changed

+8
-70
lines changed

2 files changed

+8
-70
lines changed

tests/rustdoc-ui/intra-doc/warning.stderr

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -69,29 +69,19 @@ LL | bar [BarC] bar
6969
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
7070

7171
warning: unresolved link to `BarD`
72-
--> $DIR/warning.rs:45:9
72+
--> $DIR/warning.rs:45:20
7373
|
7474
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
75-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
75+
| ^^^^ no item named `BarD` in scope
7676
|
77-
= note: the link appears in this line:
78-
79-
bar [BarD] bar
80-
^^^^
81-
= note: no item named `BarD` in scope
8277
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
8378

8479
warning: unresolved link to `BarF`
85-
--> $DIR/warning.rs:54:4
80+
--> $DIR/warning.rs:54:15
8681
|
8782
LL | f!("Foo\nbar [BarF] bar\nbaz");
88-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
83+
| ^^^^ no item named `BarF` in scope
8984
|
90-
= note: the link appears in this line:
91-
92-
bar [BarF] bar
93-
^^^^
94-
= note: no item named `BarF` in scope
9585
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
9686
= note: this warning originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
9787

@@ -112,29 +102,19 @@ LL | * time to introduce a link [error]
112102
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
113103

114104
warning: unresolved link to `error`
115-
--> $DIR/warning.rs:68:9
105+
--> $DIR/warning.rs:68:23
116106
|
117107
LL | #[doc = "single line [error]"]
118-
| ^^^^^^^^^^^^^^^^^^^^^
108+
| ^^^^^ no item named `error` in scope
119109
|
120-
= note: the link appears in this line:
121-
122-
single line [error]
123-
^^^^^
124-
= note: no item named `error` in scope
125110
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
126111

127112
warning: unresolved link to `error`
128-
--> $DIR/warning.rs:71:9
113+
--> $DIR/warning.rs:71:41
129114
|
130115
LL | #[doc = "single line with \"escaping\" [error]"]
131-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116+
| ^^^^^ no item named `error` in scope
132117
|
133-
= note: the link appears in this line:
134-
135-
single line with "escaping" [error]
136-
^^^^^
137-
= note: no item named `error` in scope
138118
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
139119

140120
warning: unresolved link to `error`

tests/rustdoc-ui/lints/bare-urls.stderr

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com/a?hello=12&bye=11#xyz"
2-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 0..43
3-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
4-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 0..21
51
error: this URL is not a hyperlink
62
--> $DIR/bare-urls.rs:5:5
73
|
@@ -19,8 +15,6 @@ help: use an automatic link instead
1915
LL | /// <https://somewhere.com>
2016
| + +
2117

22-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
23-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 22..45
2418
error: this URL is not a hyperlink
2519
--> $DIR/bare-urls.rs:7:5
2620
|
@@ -33,8 +27,6 @@ help: use an automatic link instead
3327
LL | /// <https://somewhere.com/a>
3428
| + +
3529

36-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
37-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 46..71
3830
error: this URL is not a hyperlink
3931
--> $DIR/bare-urls.rs:9:5
4032
|
@@ -47,8 +39,6 @@ help: use an automatic link instead
4739
LL | /// <https://www.somewhere.com>
4840
| + +
4941

50-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
51-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 72..99
5242
error: this URL is not a hyperlink
5343
--> $DIR/bare-urls.rs:11:5
5444
|
@@ -61,8 +51,6 @@ help: use an automatic link instead
6151
LL | /// <https://www.somewhere.com/a>
6252
| + +
6353

64-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
65-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 100..129
6654
error: this URL is not a hyperlink
6755
--> $DIR/bare-urls.rs:13:5
6856
|
@@ -75,8 +63,6 @@ help: use an automatic link instead
7563
LL | /// <https://subdomain.example.com>
7664
| + +
7765

78-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
79-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 130..152
8066
error: this URL is not a hyperlink
8167
--> $DIR/bare-urls.rs:15:5
8268
|
@@ -89,8 +75,6 @@ help: use an automatic link instead
8975
LL | /// <https://somewhere.com?>
9076
| + +
9177

92-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
93-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 153..177
9478
error: this URL is not a hyperlink
9579
--> $DIR/bare-urls.rs:17:5
9680
|
@@ -103,8 +87,6 @@ help: use an automatic link instead
10387
LL | /// <https://somewhere.com/a?>
10488
| + +
10589

106-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
107-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 178..208
10890
error: this URL is not a hyperlink
10991
--> $DIR/bare-urls.rs:19:5
11092
|
@@ -117,8 +99,6 @@ help: use an automatic link instead
11799
LL | /// <https://somewhere.com?hello=12>
118100
| + +
119101

120-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
121-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 209..241
122102
error: this URL is not a hyperlink
123103
--> $DIR/bare-urls.rs:21:5
124104
|
@@ -131,8 +111,6 @@ help: use an automatic link instead
131111
LL | /// <https://somewhere.com/a?hello=12>
132112
| + +
133113

134-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
135-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 242..274
136114
error: this URL is not a hyperlink
137115
--> $DIR/bare-urls.rs:23:5
138116
|
@@ -145,8 +123,6 @@ help: use an automatic link instead
145123
LL | /// <https://example.com?hello=12#xyz>
146124
| + +
147125

148-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
149-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 275..309
150126
error: this URL is not a hyperlink
151127
--> $DIR/bare-urls.rs:25:5
152128
|
@@ -159,8 +135,6 @@ help: use an automatic link instead
159135
LL | /// <https://example.com/a?hello=12#xyz>
160136
| + +
161137

162-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
163-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 310..333
164138
error: this URL is not a hyperlink
165139
--> $DIR/bare-urls.rs:27:5
166140
|
@@ -173,8 +147,6 @@ help: use an automatic link instead
173147
LL | /// <https://example.com#xyz>
174148
| + +
175149

176-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
177-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 334..359
178150
error: this URL is not a hyperlink
179151
--> $DIR/bare-urls.rs:29:5
180152
|
@@ -187,8 +159,6 @@ help: use an automatic link instead
187159
LL | /// <https://example.com/a#xyz>
188160
| + +
189161

190-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
191-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 360..397
192162
error: this URL is not a hyperlink
193163
--> $DIR/bare-urls.rs:31:5
194164
|
@@ -201,8 +171,6 @@ help: use an automatic link instead
201171
LL | /// <https://somewhere.com?hello=12&bye=11>
202172
| + +
203173

204-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
205-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 398..437
206174
error: this URL is not a hyperlink
207175
--> $DIR/bare-urls.rs:33:5
208176
|
@@ -215,8 +183,6 @@ help: use an automatic link instead
215183
LL | /// <https://somewhere.com/a?hello=12&bye=11>
216184
| + +
217185

218-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
219-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 438..479
220186
error: this URL is not a hyperlink
221187
--> $DIR/bare-urls.rs:35:5
222188
|
@@ -229,8 +195,6 @@ help: use an automatic link instead
229195
LL | /// <https://somewhere.com?hello=12&bye=11#xyz>
230196
| + +
231197

232-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://somewhere.com\nhttps://somewhere.com/a\nhttps://www.somewhere.com\nhttps://www.somewhere.com/a\nhttps://subdomain.example.com\nhttps://somewhere.com?\nhttps://somewhere.com/a?\nhttps://somewhere.com?hello=12\nhttps://somewhere.com/a?hello=12\nhttps://example.com?hello=12#xyz\nhttps://example.com/a?hello=12#xyz\nhttps://example.com#xyz\nhttps://example.com/a#xyz\nhttps://somewhere.com?hello=12&bye=11\nhttps://somewhere.com/a?hello=12&bye=11\nhttps://somewhere.com?hello=12&bye=11#xyz\nhey! https://somewhere.com/a?hello=12&bye=11#xyz"
233-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 485..528
234198
error: this URL is not a hyperlink
235199
--> $DIR/bare-urls.rs:37:10
236200
|
@@ -243,8 +207,6 @@ help: use an automatic link instead
243207
LL | /// hey! <https://somewhere.com/a?hello=12&bye=11#xyz>
244208
| + +
245209

246-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "here's a thing: https://example.com/"
247-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 16..36
248210
error: this URL is not a hyperlink
249211
--> $DIR/bare-urls.rs:41:26
250212
|
@@ -257,8 +219,6 @@ help: use an automatic link instead
257219
LL | #[doc = "here's a thing: <https://example.com/>"]
258220
| + +
259221

260-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://example.com/sugar\nhttps://example.com/raw"
261-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 0..25
262222
error: this URL is not a hyperlink
263223
--> $DIR/bare-urls.rs:45:5
264224
|
@@ -271,8 +231,6 @@ help: use an automatic link instead
271231
LL | /// <https://example.com/sugar>
272232
| + +
273233

274-
[src/librustdoc/passes/lint/bare_urls.rs:21:63] dox = "https://example.com/sugar\nhttps://example.com/raw"
275-
[src/librustdoc/passes/lint/bare_urls.rs:21:74] &range = 26..49
276234
error: this URL is not a hyperlink
277235
--> $DIR/bare-urls.rs:47:10
278236
|

0 commit comments

Comments
 (0)