summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Nelson <jyn514@gmail.com>2021-04-05 04:50:01 -0400
committerJoshua Nelson <jyn514@gmail.com>2021-04-05 13:52:58 -0400
commit6e4ef54d79fa87701d4a11712f900994846b811e (patch)
tree23e72a5e0373fb2f857c4d4df5ca219cc9569ae0
parent5a7a0ac51eefbdacc5b1763f8d49a787407afb34 (diff)
downloadrust-6e4ef54d79fa87701d4a11712f900994846b811e.tar.gz
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.
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 545fbf26181..40a93855cf2 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -2005,16 +2005,16 @@ fn resolution_failure(
fn anchor_failure(
cx: &DocContext<'_>,
item: &Item,
- path_str: &str,
+ ori_link: &str,
dox: &str,
link_range: Range<usize>,
failure: AnchorFailure,
) {
let msg = match failure {
- AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", path_str),
+ AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", ori_link),
AnchorFailure::RustdocAnchorConflict(res) => format!(
"`{}` contains an anchor, but links to {kind}s are already anchored",
- path_str,
+ ori_link,
kind = res.descr(),
),
};