Skip to content

Add an API to obtain all reachable items of a crate #121525

Open
@momvart

Description

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 DefIds, a superset of exported_symbols.

pub fn reachable_symbols(
    self,
    key: CrateNum
) -> &'tcx [DefId]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: A feature request, i.e: not implemented / a PR.E-help-wantedCall for participation: Help is requested to fix this issue.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions