about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2018-06-09 21:07:09 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2018-06-13 21:18:56 +0200
commite6c7868fb289c3f34a24a9498e5d010ca0f48fa6 (patch)
tree8aa6ff773270b6be03a7695f326aed3a98db393c
parent6d5e6b49285766151d9fe148341a3497b7800843 (diff)
downloadrust-e6c7868fb289c3f34a24a9498e5d010ca0f48fa6.tar.gz
rust-e6c7868fb289c3f34a24a9498e5d010ca0f48fa6.zip
Update help message to escape square brackets
-rw-r--r--src/librustdoc/clean/mod.rs4
-rw-r--r--src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-links-warning.stderr24
3 files changed, 15 insertions, 15 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 6842f1fae49..9905c69b38d 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -1315,8 +1315,8 @@ fn resolution_failure(
                                      sp,
                                      &msg)
     };
-    diag.help("to escape `[` and `]` characters, either put them into \"`[]`\" or \
-               use HTML values `&#91;` and `&#93;`");
+    diag.help("to escape `[` and `]` characters, just add '\\' before them like \
+               `\\[` or `\\]`");
     diag.emit();
 }
 
diff --git a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
index 40a7427d733..78526b3087a 100644
--- a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
+++ b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
@@ -9,5 +9,5 @@ note: lint level defined here
    |
 11 | #![deny(intra_link_resolution_failure)]
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
diff --git a/src/test/rustdoc-ui/intra-links-warning.stderr b/src/test/rustdoc-ui/intra-links-warning.stderr
index d19ea93fa63..6e47114af70 100644
--- a/src/test/rustdoc-ui/intra-links-warning.stderr
+++ b/src/test/rustdoc-ui/intra-links-warning.stderr
@@ -5,7 +5,7 @@ warning: `[Foo::baz]` cannot be resolved, ignoring it...
    |                       ^^^^^^^^ cannot be resolved, ignoring
    |
    = note: #[warn(intra_link_resolution_failure)] on by default
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Bar::foo]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:13:35
@@ -13,7 +13,7 @@ warning: `[Bar::foo]` cannot be resolved, ignoring it...
 13 |        //! Test with [Foo::baz], [Bar::foo], ...
    |                                   ^^^^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Uniooon::X]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:14:13
@@ -21,7 +21,7 @@ warning: `[Uniooon::X]` cannot be resolved, ignoring it...
 14 |      //! , [Uniooon::X] and [Qux::Z].
    |             ^^^^^^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Qux::Z]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:14:30
@@ -29,7 +29,7 @@ warning: `[Qux::Z]` cannot be resolved, ignoring it...
 14 |      //! , [Uniooon::X] and [Qux::Z].
    |                              ^^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Uniooon::X]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:16:14
@@ -37,7 +37,7 @@ warning: `[Uniooon::X]` cannot be resolved, ignoring it...
 16 |       //! , [Uniooon::X] and [Qux::Z].
    |              ^^^^^^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Qux::Z]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:16:31
@@ -45,7 +45,7 @@ warning: `[Qux::Z]` cannot be resolved, ignoring it...
 16 |       //! , [Uniooon::X] and [Qux::Z].
    |                               ^^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[Qux:Y]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:18:13
@@ -53,7 +53,7 @@ warning: `[Qux:Y]` cannot be resolved, ignoring it...
 18 |        /// [Qux:Y]
    |             ^^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[BarA]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:24:10
@@ -61,7 +61,7 @@ warning: `[BarA]` cannot be resolved, ignoring it...
 24 | /// bar [BarA] bar
    |          ^^^^ cannot be resolved, ignoring
    |
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[BarB]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:28:1
@@ -77,7 +77,7 @@ warning: `[BarB]` cannot be resolved, ignoring it...
            
             bar [BarB] bar
                  ^^^^
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[BarC]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:35:1
@@ -95,7 +95,7 @@ warning: `[BarC]` cannot be resolved, ignoring it...
            
            bar [BarC] bar
                 ^^^^
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[BarD]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:48:1
@@ -107,7 +107,7 @@ warning: `[BarD]` cannot be resolved, ignoring it...
            
            bar [BarD] bar
                 ^^^^
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`
 
 warning: `[BarF]` cannot be resolved, ignoring it...
   --> $DIR/intra-links-warning.rs:53:9
@@ -122,5 +122,5 @@ warning: `[BarF]` cannot be resolved, ignoring it...
            
            bar [BarF] bar
                 ^^^^
-   = help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `&#91;` and `&#93;`
+   = help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`