Update URLs used in the lint example

This commit is contained in:
Guillaume Gomez 2020-10-17 16:43:13 +02:00
parent 60caf51b0d
commit fce2be0ea7

View File

@ -292,11 +292,11 @@ This lint is **nightly-only** and **warns by default**. It detects links which
could use the "automatic" link syntax. For example: could use the "automatic" link syntax. For example:
```rust ```rust
/// http://hello.rs /// http://example.org
/// [http://a.com](http://a.com) /// [http://example.com](http://example.com)
/// [http://b.com] /// [http://example.net]
/// ///
/// [http://b.com]: http://b.com /// [http://example.com]: http://example.com
pub fn foo() {} pub fn foo() {}
``` ```
@ -304,21 +304,22 @@ Which will give:
```text ```text
warning: this URL is not a hyperlink warning: this URL is not a hyperlink
--> foo.rs:3:5 --> foo.rs:1:5
| |
3 | /// http://hello.rs 1 | /// http://example.org
| ^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://hello.rs>` | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.org>`
| |
= note: `#[warn(url_improvements)]` on by default
warning: unneeded long form for URL warning: unneeded long form for URL
--> foo.rs:4:5 --> foo.rs:2:5
| |
4 | /// [http://a.com](http://a.com) 2 | /// [http://example.com](http://example.com)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://a.com>` | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.com>`
warning: unneeded long form for URL warning: this URL is not a hyperlink
--> foo.rs:5:5 --> foo.rs:3:6
| |
5 | /// [http://b.com] 3 | /// [http://example.net]
| ^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://b.com>` | ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.net>`
``` ```