This repository was archived by the owner on May 28, 2025. It is now read-only.
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
292292could use the "automatic" link syntax. For example:
293293
294294``` 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 ]
298298///
299- /// [http://b .com]: http://b .com
299+ /// [http://example .com]: http://example .com
300300pub fn foo () {}
301301```
302302
303303Which will give:
304304
305305``` text
306306warning: this URL is not a hyperlink
307- --> foo.rs:3 :5
307+ --> foo.rs:1 :5
308308 |
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 >`
311311 |
312+ = note: `#[warn(url_improvements)]` on by default
312313
313314warning: unneeded long form for URL
314- --> foo.rs:4 :5
315+ --> foo.rs:2 :5
315316 |
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>`
318319
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
321322 |
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 >`
324325```
You can’t perform that action at this time.
0 commit comments