Skip to content

Commit

Permalink
Remove tcx-specific API
Browse files Browse the repository at this point in the history
CStore only has `def_path`, not `opt_item_name`. Fortunately anything
that can be documented also has a name, so this can just use
`def_path().to_string()` instead.
  • Loading branch information
jyn514 committed Apr 4, 2021
1 parent 3e1a3fd commit 5d5be02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -883,7 +883,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
debug!("using type_of(): {:?}", name);
name
} else {
let name = self.cx.tcx.opt_item_name(self_id).map(|sym| sym.to_string());
let name = Some(self.cx.tcx.def_path(self_id).to_string_no_crate_verbose());
debug!("using item_name(): {:?}", name);
name
}
Expand Down

0 comments on commit 5d5be02

Please sign in to comment.