Skip to content

Commit

Permalink
Update help message to escape square brackets
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumeGomez committed Jun 13, 2018
1 parent 6d5e6b4 commit e6c7868
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/librustdoc/clean/mod.rs
Expand Up @@ -1315,8 +1315,8 @@ fn resolution_failure(
sp,
&msg)
};
diag.help("to escape `[` and `]` characters, either put them into \"`[]`\" or \
use HTML values `[` and `]`");
diag.help("to escape `[` and `]` characters, just add '\\' before them like \
`\\[` or `\\]`");
diag.emit();
}

Expand Down
Expand Up @@ -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 `[` and `]`
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`

24 changes: 12 additions & 12 deletions src/test/rustdoc-ui/intra-links-warning.stderr
Expand Up @@ -5,63 +5,63 @@ 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 `[` and `]`
= 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 | //! Test with [Foo::baz], [Bar::foo], ...
| ^^^^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
14 | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
14 | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
16 | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
16 | //! , [Uniooon::X] and [Qux::Z].
| ^^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
18 | /// [Qux:Y]
| ^^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
|
24 | /// bar [BarA] bar
| ^^^^ cannot be resolved, ignoring
|
= help: to escape `[` and `]` characters, either put them into "`[]`" or use HTML values `[` and `]`
= 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
Expand All @@ -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 `[` and `]`
= 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
Expand All @@ -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 `[` and `]`
= 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
Expand All @@ -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 `[` and `]`
= 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
Expand All @@ -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 `[` and `]`
= help: to escape `[` and `]` characters, just add '/' before them like `/[` or `/]`

0 comments on commit e6c7868

Please sign in to comment.