about summary refs log tree commit diff
path: root/src/doc/rustdoc
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2020-10-17 16:43:13 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2020-11-05 10:22:08 +0100
commitfce2be0ea7b90fb9ba1a1704454b36307c9b8c07 (patch)
treebb5ff5107229078cdc028d6724d534dabeecfc13 /src/doc/rustdoc
parent60caf51b0de940705e7679a26343f6dcbe470a54 (diff)
downloadrust-fce2be0ea7b90fb9ba1a1704454b36307c9b8c07.tar.gz
rust-fce2be0ea7b90fb9ba1a1704454b36307c9b8c07.zip
Update URLs used in the lint example
Diffstat (limited to 'src/doc/rustdoc')
-rw-r--r--src/doc/rustdoc/src/lints.md29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/doc/rustdoc/src/lints.md b/src/doc/rustdoc/src/lints.md
index 7db9c93852d..a89c094bf4c 100644
--- a/src/doc/rustdoc/src/lints.md
+++ b/src/doc/rustdoc/src/lints.md
@@ -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:
 
 ```rust
-/// http://hello.rs
-/// [http://a.com](http://a.com)
-/// [http://b.com]
+/// http://example.org
+/// [http://example.com](http://example.com)
+/// [http://example.net]
 ///
-/// [http://b.com]: http://b.com
+/// [http://example.com]: http://example.com
 pub fn foo() {}
 ```
 
@@ -304,21 +304,22 @@ Which will give:
 
 ```text
 warning: this URL is not a hyperlink
- --> foo.rs:3:5
+ --> foo.rs:1:5
   |
-3 | /// http://hello.rs
-  |     ^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://hello.rs>`
+1 | /// http://example.org
+  |     ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.org>`
   |
+  = note: `#[warn(url_improvements)]` on by default
 
 warning: unneeded long form for URL
- --> foo.rs:4:5
+ --> foo.rs:2:5
   |
-4 | /// [http://a.com](http://a.com)
-  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://a.com>`
+2 | /// [http://example.com](http://example.com)
+  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.com>`
 
-warning: unneeded long form for URL
- --> foo.rs:5:5
+warning: this URL is not a hyperlink
+ --> foo.rs:3:6
   |
-5 | /// [http://b.com]
-  |     ^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://b.com>`
+3 | /// [http://example.net]
+  |      ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.net>`
 ```