File tree Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Expand file tree Collapse file tree 1 file changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -292,33 +292,34 @@ This lint is **nightly-only** and **warns by default**. It detects links which
292
292
could use the "automatic" link syntax. For example:
293
293
294
294
``` rust
295
- /// http://hello.rs
296
- /// [http://a .com](http://a .com)
297
- /// [http://b.com ]
295
+ /// http://example.org
296
+ /// [http://example .com](http://example .com)
297
+ /// [http://example.net ]
298
298
///
299
- /// [http://b .com]: http://b .com
299
+ /// [http://example .com]: http://example .com
300
300
pub fn foo () {}
301
301
```
302
302
303
303
Which will give:
304
304
305
305
``` text
306
306
warning: this URL is not a hyperlink
307
- --> foo.rs:3 :5
307
+ --> foo.rs:1 :5
308
308
|
309
- 3 | /// http://hello.rs
310
- | ^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://hello.rs >`
309
+ 1 | /// http://example.org
310
+ | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.org >`
311
311
|
312
+ = note: `#[warn(url_improvements)]` on by default
312
313
313
314
warning: unneeded long form for URL
314
- --> foo.rs:4 :5
315
+ --> foo.rs:2 :5
315
316
|
316
- 4 | /// [http://a .com](http://a .com)
317
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://a .com>`
317
+ 2 | /// [http://example .com](http://example .com)
318
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example .com>`
318
319
319
- warning: unneeded long form for URL
320
- --> foo.rs:5:5
320
+ warning: this URL is not a hyperlink
321
+ --> foo.rs:3:6
321
322
|
322
- 5 | /// [http://b.com ]
323
- | ^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://b.com >`
323
+ 3 | /// [http://example.net ]
324
+ | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.net >`
324
325
```
You can’t perform that action at this time.
0 commit comments