Skip to content

Commit

Permalink
Rename path_str -> ori_link in anchor_failure
Browse files Browse the repository at this point in the history
ori_link contains anchors, path_str does not. It's important that
anchor_failure be passed a link with the anchors still present.
  • Loading branch information
jyn514 committed Apr 5, 2021
1 parent 5a7a0ac commit 6e4ef54
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
),
};
Expand Down

0 comments on commit 6e4ef54

Please sign in to comment.