Skip to content

Commit 1531c95

Browse files
Add code comment to remind contributors to update rustdoc book if they update the disambiguators list
1 parent a091fd2 commit 1531c95

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+2
Original file line numberDiff line numberDiff line change
@@ -1419,6 +1419,7 @@ impl Disambiguator {
14191419
if let Some(idx) = link.find('@') {
14201420
let (prefix, rest) = link.split_at(idx);
14211421
let d = match prefix {
1422+
// If you update this list, please also update the relevant rustdoc book section!
14221423
"struct" => Kind(DefKind::Struct),
14231424
"enum" => Kind(DefKind::Enum),
14241425
"trait" => Kind(DefKind::Trait),
@@ -1437,6 +1438,7 @@ impl Disambiguator {
14371438
Ok(Some((d, &rest[1..], &rest[1..])))
14381439
} else {
14391440
let suffixes = [
1441+
// If you update this list, please also update the relevant rustdoc book section!
14401442
("!()", DefKind::Macro(MacroKind::Bang)),
14411443
("!{}", DefKind::Macro(MacroKind::Bang)),
14421444
("![]", DefKind::Macro(MacroKind::Bang)),

0 commit comments

Comments
 (0)