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.
This commit is contained in:
parent
5a7a0ac51e
commit
6e4ef54d79
@ -2005,16 +2005,16 @@ fn split(path: &str) -> Option<(&str, &str)> {
|
|||||||
fn anchor_failure(
|
fn anchor_failure(
|
||||||
cx: &DocContext<'_>,
|
cx: &DocContext<'_>,
|
||||||
item: &Item,
|
item: &Item,
|
||||||
path_str: &str,
|
ori_link: &str,
|
||||||
dox: &str,
|
dox: &str,
|
||||||
link_range: Range<usize>,
|
link_range: Range<usize>,
|
||||||
failure: AnchorFailure,
|
failure: AnchorFailure,
|
||||||
) {
|
) {
|
||||||
let msg = match failure {
|
let msg = match failure {
|
||||||
AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", path_str),
|
AnchorFailure::MultipleAnchors => format!("`{}` contains multiple anchors", ori_link),
|
||||||
AnchorFailure::RustdocAnchorConflict(res) => format!(
|
AnchorFailure::RustdocAnchorConflict(res) => format!(
|
||||||
"`{}` contains an anchor, but links to {kind}s are already anchored",
|
"`{}` contains an anchor, but links to {kind}s are already anchored",
|
||||||
path_str,
|
ori_link,
|
||||||
kind = res.descr(),
|
kind = res.descr(),
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user