Skip to content

Commit 99354f5

Browse files
committed
item -> link
1 parent 743f932 commit 99354f5

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
819819
// The resolved item did not match the disambiguator; give a better error than 'not found'
820820
let msg = format!("unresolved link to `{}`", path_str);
821821
report_diagnostic(cx, &msg, &item, &dox, link_range, |diag, sp| {
822-
let msg = format!("this item resolved to {} {}, which did not match the disambiguator '{}'", kind.article(), kind.descr(id), disambiguator);
822+
let msg = format!("this link resolved to {} {}, which did not match the disambiguator '{}'", kind.article(), kind.descr(id), disambiguator);
823823
if let Some(sp) = sp {
824824
diag.span_note(sp, &msg);
825825
} else {

src/test/rustdoc-ui/intra-links-disambiguator-mismatch.stderr

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: unresolved link to `S`
2-
--> $DIR/intra-links-disambiguator-mismatch.rs:16:14
2+
--> $DIR/intra-links-disambiguator-mismatch.rs:14:14
33
|
44
LL | /// Link to [struct@S]
55
| ^^^^^^^^
@@ -9,116 +9,116 @@ note: the lint level is defined here
99
|
1010
LL | #![deny(broken_intra_doc_links)]
1111
| ^^^^^^^^^^^^^^^^^^^^^^
12-
note: this item resolved to an enum, which did not match the disambiguator 'struct'
13-
--> $DIR/intra-links-disambiguator-mismatch.rs:16:14
12+
note: this link resolved to an enum, which did not match the disambiguator 'struct'
13+
--> $DIR/intra-links-disambiguator-mismatch.rs:14:14
1414
|
1515
LL | /// Link to [struct@S]
1616
| ^^^^^^^^
1717

1818
error: unresolved link to `S`
19-
--> $DIR/intra-links-disambiguator-mismatch.rs:20:14
19+
--> $DIR/intra-links-disambiguator-mismatch.rs:18:14
2020
|
2121
LL | /// Link to [mod@S]
2222
| ^^^^^
2323
|
24-
note: this item resolved to an enum, which did not match the disambiguator 'mod'
25-
--> $DIR/intra-links-disambiguator-mismatch.rs:20:14
24+
note: this link resolved to an enum, which did not match the disambiguator 'mod'
25+
--> $DIR/intra-links-disambiguator-mismatch.rs:18:14
2626
|
2727
LL | /// Link to [mod@S]
2828
| ^^^^^
2929

3030
error: unresolved link to `S`
31-
--> $DIR/intra-links-disambiguator-mismatch.rs:24:14
31+
--> $DIR/intra-links-disambiguator-mismatch.rs:22:14
3232
|
3333
LL | /// Link to [union@S]
3434
| ^^^^^^^
3535
|
36-
note: this item resolved to an enum, which did not match the disambiguator 'union'
37-
--> $DIR/intra-links-disambiguator-mismatch.rs:24:14
36+
note: this link resolved to an enum, which did not match the disambiguator 'union'
37+
--> $DIR/intra-links-disambiguator-mismatch.rs:22:14
3838
|
3939
LL | /// Link to [union@S]
4040
| ^^^^^^^
4141

4242
error: unresolved link to `S`
43-
--> $DIR/intra-links-disambiguator-mismatch.rs:28:14
43+
--> $DIR/intra-links-disambiguator-mismatch.rs:26:14
4444
|
4545
LL | /// Link to [trait@S]
4646
| ^^^^^^^
4747
|
48-
note: this item resolved to an enum, which did not match the disambiguator 'trait'
49-
--> $DIR/intra-links-disambiguator-mismatch.rs:28:14
48+
note: this link resolved to an enum, which did not match the disambiguator 'trait'
49+
--> $DIR/intra-links-disambiguator-mismatch.rs:26:14
5050
|
5151
LL | /// Link to [trait@S]
5252
| ^^^^^^^
5353

5454
error: unresolved link to `T`
55-
--> $DIR/intra-links-disambiguator-mismatch.rs:32:14
55+
--> $DIR/intra-links-disambiguator-mismatch.rs:30:14
5656
|
5757
LL | /// Link to [struct@T]
5858
| ^^^^^^^^
5959
|
60-
note: this item resolved to a trait, which did not match the disambiguator 'struct'
61-
--> $DIR/intra-links-disambiguator-mismatch.rs:32:14
60+
note: this link resolved to a trait, which did not match the disambiguator 'struct'
61+
--> $DIR/intra-links-disambiguator-mismatch.rs:30:14
6262
|
6363
LL | /// Link to [struct@T]
6464
| ^^^^^^^^
6565

6666
error: unresolved link to `m`
67-
--> $DIR/intra-links-disambiguator-mismatch.rs:36:14
67+
--> $DIR/intra-links-disambiguator-mismatch.rs:34:14
6868
|
6969
LL | /// Link to [derive@m]
7070
| ^^^^^^^^
7171
|
72-
note: this item resolved to a macro, which did not match the disambiguator 'derive'
73-
--> $DIR/intra-links-disambiguator-mismatch.rs:36:14
72+
note: this link resolved to a macro, which did not match the disambiguator 'derive'
73+
--> $DIR/intra-links-disambiguator-mismatch.rs:34:14
7474
|
7575
LL | /// Link to [derive@m]
7676
| ^^^^^^^^
7777

7878
error: unresolved link to `s`
79-
--> $DIR/intra-links-disambiguator-mismatch.rs:40:14
79+
--> $DIR/intra-links-disambiguator-mismatch.rs:38:14
8080
|
8181
LL | /// Link to [const@s]
8282
| ^^^^^^^
8383
|
84-
note: this item resolved to a static, which did not match the disambiguator 'const'
85-
--> $DIR/intra-links-disambiguator-mismatch.rs:40:14
84+
note: this link resolved to a static, which did not match the disambiguator 'const'
85+
--> $DIR/intra-links-disambiguator-mismatch.rs:38:14
8686
|
8787
LL | /// Link to [const@s]
8888
| ^^^^^^^
8989

9090
error: unresolved link to `c`
91-
--> $DIR/intra-links-disambiguator-mismatch.rs:44:14
91+
--> $DIR/intra-links-disambiguator-mismatch.rs:42:14
9292
|
9393
LL | /// Link to [static@c]
9494
| ^^^^^^^^
9595
|
96-
note: this item resolved to a constant, which did not match the disambiguator 'static'
97-
--> $DIR/intra-links-disambiguator-mismatch.rs:44:14
96+
note: this link resolved to a constant, which did not match the disambiguator 'static'
97+
--> $DIR/intra-links-disambiguator-mismatch.rs:42:14
9898
|
9999
LL | /// Link to [static@c]
100100
| ^^^^^^^^
101101

102102
error: unresolved link to `c`
103-
--> $DIR/intra-links-disambiguator-mismatch.rs:48:14
103+
--> $DIR/intra-links-disambiguator-mismatch.rs:46:14
104104
|
105105
LL | /// Link to [fn@c]
106106
| ^^^^
107107
|
108-
note: this item resolved to a constant, which did not match the disambiguator 'fn'
109-
--> $DIR/intra-links-disambiguator-mismatch.rs:48:14
108+
note: this link resolved to a constant, which did not match the disambiguator 'fn'
109+
--> $DIR/intra-links-disambiguator-mismatch.rs:46:14
110110
|
111111
LL | /// Link to [fn@c]
112112
| ^^^^
113113

114114
error: unresolved link to `c`
115-
--> $DIR/intra-links-disambiguator-mismatch.rs:52:14
115+
--> $DIR/intra-links-disambiguator-mismatch.rs:50:14
116116
|
117117
LL | /// Link to [c()]
118118
| ^^^
119119
|
120-
note: this item resolved to a constant, which did not match the disambiguator 'fn'
121-
--> $DIR/intra-links-disambiguator-mismatch.rs:52:14
120+
note: this link resolved to a constant, which did not match the disambiguator 'fn'
121+
--> $DIR/intra-links-disambiguator-mismatch.rs:50:14
122122
|
123123
LL | /// Link to [c()]
124124
| ^^^

0 commit comments

Comments
 (0)