Add an API to obtain all reachable items of a crate #121525
Open
Description
opened on Feb 23, 2024
TyCtxt
currently provides an API to get all exported symbols of a crate. Still, there are some items in external crates that are not necessarily exported but are reachable and there is no direct way to get them. For example, some public generic functions provided by a library are like that.
Although it is possible to find them using methods like module_children
, I want to request an API in TyCtxt
that returns all reachable DefId
s, a superset of exported_symbols
.
pub fn reachable_symbols(
self,
key: CrateNum
) -> &'tcx [DefId]
Activity