Skip to content

Commit

Permalink
rustdoc: use a template to generate Hrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsha committed Apr 5, 2023
1 parent f98a271 commit ae1a1ef
Show file tree
Hide file tree
Showing 7 changed files with 254 additions and 214 deletions.
3 changes: 2 additions & 1 deletion src/librustdoc/clean/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,8 @@ impl Item {
.iter()
.filter_map(|ItemLink { link: s, link_text, page_id: id, ref fragment }| {
debug!(?id);
if let Ok((mut href, ..)) = href(*id, cx) {
if let Ok((href, ..)) = href(*id, cx) {
let mut href = href.render_string();
debug!(?href);
if let Some(ref fragment) = *fragment {
fragment.render(&mut href, cx.tcx())
Expand Down
Loading

0 comments on commit ae1a1ef

Please sign in to comment.