Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 6e4ef54

Browse files
committed
Rename path_str -> ori_link in anchor_failure
ori_link contains anchors, path_str does not. It's important that anchor_failure be passed a link with the anchors still present.
1 parent 5a7a0ac commit 6e4ef54

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,16 +2005,16 @@ fn resolution_failure(
20052005
fn anchor_failure(
20062006
cx: &DocContext<'_>,
20072007
item: &Item,
2008-
path_str: &str,
2008+
ori_link: &str,
20092009
dox: &str,
20102010
link_range: Range<usize>,
20112011
failure: AnchorFailure,
20122012
) {
20132013
let msg = match failure {
2014-
AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", path_str),
2014+
AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", ori_link),
20152015
AnchorFailure::RustdocAnchorConflict(res) => format!(
20162016
"`{}` contains an anchor, but links to {kind}s are already anchored",
2017-
path_str,
2017+
ori_link,
20182018
kind = res.descr(),
20192019
),
20202020
};

0 commit comments

Comments
 (0)