Skip to content

Commit c1ea1fd

Browse files
Update error messages
1 parent 433f2b0 commit c1ea1fd

10 files changed

+39
-39
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
340340
let parts = link.split('#').collect::<Vec<_>>();
341341
let (link, extra_fragment) = if parts.len() > 2 {
342342
build_diagnostic(cx, &item, &link, &dox, link_range,
343-
"has an anchor issue...",
343+
"has an issue with the link anchor.",
344344
"only one `#` is allowed in a link",
345345
None);
346346
continue;
@@ -625,7 +625,7 @@ fn resolution_failure(
625625
link_range: Option<Range<usize>>,
626626
) {
627627
build_diagnostic(cx, item, path_str, dox, link_range,
628-
"cannot be resolved, ignoring it...",
628+
"cannot be resolved, ignoring it.",
629629
"cannot be resolved, ignoring",
630630
Some("to escape `[` and `]` characters, just add '\\' before them like `\\[` or `\\]`"));
631631
}
@@ -639,7 +639,7 @@ fn anchor_failure(
639639
msg: &str,
640640
) {
641641
build_diagnostic(cx, item, path_str, dox, link_range,
642-
"has an anchor issue...",
642+
"has an issue with the link anchor.",
643643
msg,
644644
None);
645645
}

src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `[v2]` cannot be resolved, ignoring it...
1+
error: `[v2]` cannot be resolved, ignoring it.
22
--> $DIR/deny-intra-link-resolution-failure.rs:3:6
33
|
44
LL | /// [v2]

src/test/rustdoc-ui/intra-doc-alias-ice.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `[TypeAlias::hoge]` cannot be resolved, ignoring it...
1+
error: `[TypeAlias::hoge]` cannot be resolved, ignoring it.
22
--> $DIR/intra-doc-alias-ice.rs:5:30
33
|
44
LL | /// [broken cross-reference](TypeAlias::hoge)

src/test/rustdoc-ui/intra-link-span-ice-55723.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/// ## For example:
88
///
99
/// (arr[i])
10-
//~^ ERROR `[i]` cannot be resolved, ignoring it...
10+
//~^ ERROR `[i]` cannot be resolved, ignoring it.
1111
pub fn test_ice() {
1212
unimplemented!();
1313
}

src/test/rustdoc-ui/intra-link-span-ice-55723.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `[i]` cannot be resolved, ignoring it...
1+
error: `[i]` cannot be resolved, ignoring it.
22
--> $DIR/intra-link-span-ice-55723.rs:9:10
33
|
44
LL | /// (arr[i])

src/test/rustdoc-ui/intra-links-anchors.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ pub enum Enum {
2323
/// Like [Foo#hola].
2424
///
2525
/// Or maybe [Foo::f#hola].
26-
//~^ ERROR `[Foo::f#hola]` has an anchor issue...
26+
//~^ ERROR `[Foo::f#hola]` has an issue with the link anchor.
2727
pub fn foo() {}
2828

2929
/// Empty.
3030
///
3131
/// Another anchor error: [hello#people#!].
32-
//~^ ERROR `[hello#people#!]` has an anchor issue...
32+
//~^ ERROR `[hello#people#!]` has an issue with the link anchor.
3333
pub fn bar() {}
3434

3535
/// Empty?
3636
///
3737
/// Damn enum's variants: [Enum::A#whatever].
38-
//~^ ERROR `[Enum::A#whatever]` has an anchor issue...
38+
//~^ ERROR `[Enum::A#whatever]` has an issue with the link anchor.
3939
pub fn enum_link() {}
4040

4141
/// Primitives?
4242
///
4343
/// [u32#hello]
44-
//~^ ERROR `[u32#hello]` has an anchor issue...
44+
//~^ ERROR `[u32#hello]` has an issue with the link anchor.
4545
pub fn x() {}

src/test/rustdoc-ui/intra-links-anchors.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: `[Foo::f#hola]` has an anchor issue...
1+
error: `[Foo::f#hola]` has an issue with the link anchor.
22
--> $DIR/intra-links-anchors.rs:25:15
33
|
44
LL | /// Or maybe [Foo::f#hola].
@@ -10,19 +10,19 @@ note: lint level defined here
1010
LL | #![deny(intra_doc_link_resolution_failure)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1212

13-
error: `[hello#people#!]` has an anchor issue...
13+
error: `[hello#people#!]` has an issue with the link anchor.
1414
--> $DIR/intra-links-anchors.rs:31:28
1515
|
1616
LL | /// Another anchor error: [hello#people#!].
1717
| ^^^^^^^^^^^^^^ only one `#` is allowed in a link
1818

19-
error: `[Enum::A#whatever]` has an anchor issue...
19+
error: `[Enum::A#whatever]` has an issue with the link anchor.
2020
--> $DIR/intra-links-anchors.rs:37:28
2121
|
2222
LL | /// Damn enum's variants: [Enum::A#whatever].
2323
| ^^^^^^^^^^^^^^^^ variants cannot be followed by anchors
2424

25-
error: `[u32#hello]` has an anchor issue...
25+
error: `[u32#hello]` has an issue with the link anchor.
2626
--> $DIR/intra-links-anchors.rs:43:6
2727
|
2828
LL | /// [u32#hello]

src/test/rustdoc-ui/intra-links-warning-crlf.stderr

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: `[error]` cannot be resolved, ignoring it...
1+
warning: `[error]` cannot be resolved, ignoring it.
22
--> $DIR/intra-links-warning-crlf.rs:7:6
33
|
44
LL | /// [error]
@@ -7,23 +7,23 @@ LL | /// [error]
77
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
88
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

10-
warning: `[error1]` cannot be resolved, ignoring it...
10+
warning: `[error1]` cannot be resolved, ignoring it.
1111
--> $DIR/intra-links-warning-crlf.rs:12:11
1212
|
1313
LL | /// docs [error1]
1414
| ^^^^^^ cannot be resolved, ignoring
1515
|
1616
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1717

18-
warning: `[error2]` cannot be resolved, ignoring it...
18+
warning: `[error2]` cannot be resolved, ignoring it.
1919
--> $DIR/intra-links-warning-crlf.rs:15:11
2020
|
2121
LL | /// docs [error2]
2222
| ^^^^^^ cannot be resolved, ignoring
2323
|
2424
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2525

26-
warning: `[error]` cannot be resolved, ignoring it...
26+
warning: `[error]` cannot be resolved, ignoring it.
2727
--> $DIR/intra-links-warning-crlf.rs:23:20
2828
|
2929
LL | * It also has an [error].

src/test/rustdoc-ui/intra-links-warning.stderr

+19-19
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
warning: `[Foo::baz]` cannot be resolved, ignoring it...
1+
warning: `[Foo::baz]` cannot be resolved, ignoring it.
22
--> $DIR/intra-links-warning.rs:3:23
33
|
44
LL | //! Test with [Foo::baz], [Bar::foo], ...
@@ -7,71 +7,71 @@ LL | //! Test with [Foo::baz], [Bar::foo], ...
77
= note: `#[warn(intra_doc_link_resolution_failure)]` on by default
88
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
99

10-
warning: `[Bar::foo]` cannot be resolved, ignoring it...
10+
warning: `[Bar::foo]` cannot be resolved, ignoring it.
1111
--> $DIR/intra-links-warning.rs:3:35
1212
|
1313
LL | //! Test with [Foo::baz], [Bar::foo], ...
1414
| ^^^^^^^^ cannot be resolved, ignoring
1515
|
1616
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
1717

18-
warning: `[Uniooon::X]` cannot be resolved, ignoring it...
18+
warning: `[Uniooon::X]` cannot be resolved, ignoring it.
1919
--> $DIR/intra-links-warning.rs:6:13
2020
|
2121
LL | //! , [Uniooon::X] and [Qux::Z].
2222
| ^^^^^^^^^^ cannot be resolved, ignoring
2323
|
2424
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
2525

26-
warning: `[Qux::Z]` cannot be resolved, ignoring it...
26+
warning: `[Qux::Z]` cannot be resolved, ignoring it.
2727
--> $DIR/intra-links-warning.rs:6:30
2828
|
2929
LL | //! , [Uniooon::X] and [Qux::Z].
3030
| ^^^^^^ cannot be resolved, ignoring
3131
|
3232
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
3333

34-
warning: `[Uniooon::X]` cannot be resolved, ignoring it...
34+
warning: `[Uniooon::X]` cannot be resolved, ignoring it.
3535
--> $DIR/intra-links-warning.rs:10:14
3636
|
3737
LL | //! , [Uniooon::X] and [Qux::Z].
3838
| ^^^^^^^^^^ cannot be resolved, ignoring
3939
|
4040
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
4141

42-
warning: `[Qux::Z]` cannot be resolved, ignoring it...
42+
warning: `[Qux::Z]` cannot be resolved, ignoring it.
4343
--> $DIR/intra-links-warning.rs:10:31
4444
|
4545
LL | //! , [Uniooon::X] and [Qux::Z].
4646
| ^^^^^^ cannot be resolved, ignoring
4747
|
4848
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
4949

50-
warning: `[Qux:Y]` cannot be resolved, ignoring it...
50+
warning: `[Qux:Y]` cannot be resolved, ignoring it.
5151
--> $DIR/intra-links-warning.rs:14:13
5252
|
5353
LL | /// [Qux:Y]
5454
| ^^^^^ cannot be resolved, ignoring
5555
|
5656
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
5757

58-
warning: `[error]` cannot be resolved, ignoring it...
58+
warning: `[error]` cannot be resolved, ignoring it.
5959
--> $DIR/intra-links-warning.rs:58:30
6060
|
6161
LL | * time to introduce a link [error]*/
6262
| ^^^^^ cannot be resolved, ignoring
6363
|
6464
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
6565

66-
warning: `[error]` cannot be resolved, ignoring it...
66+
warning: `[error]` cannot be resolved, ignoring it.
6767
--> $DIR/intra-links-warning.rs:64:30
6868
|
6969
LL | * time to introduce a link [error]
7070
| ^^^^^ cannot be resolved, ignoring
7171
|
7272
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
7373

74-
warning: `[error]` cannot be resolved, ignoring it...
74+
warning: `[error]` cannot be resolved, ignoring it.
7575
--> $DIR/intra-links-warning.rs:68:1
7676
|
7777
LL | #[doc = "single line [error]"]
@@ -83,7 +83,7 @@ LL | #[doc = "single line [error]"]
8383
^^^^^
8484
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
8585

86-
warning: `[error]` cannot be resolved, ignoring it...
86+
warning: `[error]` cannot be resolved, ignoring it.
8787
--> $DIR/intra-links-warning.rs:71:1
8888
|
8989
LL | #[doc = "single line with \"escaping\" [error]"]
@@ -95,7 +95,7 @@ LL | #[doc = "single line with \"escaping\" [error]"]
9595
^^^^^
9696
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
9797

98-
warning: `[error]` cannot be resolved, ignoring it...
98+
warning: `[error]` cannot be resolved, ignoring it.
9999
--> $DIR/intra-links-warning.rs:74:1
100100
|
101101
LL | / /// Item docs.
@@ -109,47 +109,47 @@ LL | | /// [error]
109109
^^^^^
110110
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
111111

112-
warning: `[error1]` cannot be resolved, ignoring it...
112+
warning: `[error1]` cannot be resolved, ignoring it.
113113
--> $DIR/intra-links-warning.rs:80:11
114114
|
115115
LL | /// docs [error1]
116116
| ^^^^^^ cannot be resolved, ignoring
117117
|
118118
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
119119

120-
warning: `[error2]` cannot be resolved, ignoring it...
120+
warning: `[error2]` cannot be resolved, ignoring it.
121121
--> $DIR/intra-links-warning.rs:82:11
122122
|
123123
LL | /// docs [error2]
124124
| ^^^^^^ cannot be resolved, ignoring
125125
|
126126
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
127127

128-
warning: `[BarA]` cannot be resolved, ignoring it...
128+
warning: `[BarA]` cannot be resolved, ignoring it.
129129
--> $DIR/intra-links-warning.rs:21:10
130130
|
131131
LL | /// bar [BarA] bar
132132
| ^^^^ cannot be resolved, ignoring
133133
|
134134
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
135135

136-
warning: `[BarB]` cannot be resolved, ignoring it...
136+
warning: `[BarB]` cannot be resolved, ignoring it.
137137
--> $DIR/intra-links-warning.rs:27:9
138138
|
139139
LL | * bar [BarB] bar
140140
| ^^^^ cannot be resolved, ignoring
141141
|
142142
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
143143

144-
warning: `[BarC]` cannot be resolved, ignoring it...
144+
warning: `[BarC]` cannot be resolved, ignoring it.
145145
--> $DIR/intra-links-warning.rs:34:6
146146
|
147147
LL | bar [BarC] bar
148148
| ^^^^ cannot be resolved, ignoring
149149
|
150150
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
151151

152-
warning: `[BarD]` cannot be resolved, ignoring it...
152+
warning: `[BarD]` cannot be resolved, ignoring it.
153153
--> $DIR/intra-links-warning.rs:45:1
154154
|
155155
LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
@@ -161,7 +161,7 @@ LL | #[doc = "Foo\nbar [BarD] bar\nbaz"]
161161
^^^^
162162
= help: to escape `[` and `]` characters, just add '\' before them like `\[` or `\]`
163163

164-
warning: `[BarF]` cannot be resolved, ignoring it...
164+
warning: `[BarF]` cannot be resolved, ignoring it.
165165
--> $DIR/intra-links-warning.rs:50:9
166166
|
167167
LL | #[doc = $f]

src/test/rustdoc-ui/lint-group.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ LL | #![deny(rustdoc)]
1515
| ^^^^^^^
1616
= note: `#[deny(private_doc_tests)]` implied by `#[deny(rustdoc)]`
1717

18-
error: `[error]` cannot be resolved, ignoring it...
18+
error: `[error]` cannot be resolved, ignoring it.
1919
--> $DIR/lint-group.rs:9:29
2020
|
2121
LL | /// what up, let's make an [error]

0 commit comments

Comments
 (0)