Skip to content

Commit 5d5be02

Browse files
committed
Remove tcx-specific API
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.
1 parent 3e1a3fd commit 5d5be02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ impl<'a, 'tcx> DocFolder for LinkCollector<'a, 'tcx> {
883883
debug!("using type_of(): {:?}", name);
884884
name
885885
} else {
886-
let name = self.cx.tcx.opt_item_name(self_id).map(|sym| sym.to_string());
886+
let name = Some(self.cx.tcx.def_path(self_id).to_string_no_crate_verbose());
887887
debug!("using item_name(): {:?}", name);
888888
name
889889
}

0 commit comments

Comments
 (0)