-
Notifications
You must be signed in to change notification settings - Fork 26
Provide an API to get imports, particularly pub use
#123
Comments
What exactly does Rustdoc need to know here? How does it use the info and why does it need to distinguish between an export and a re-export? |
The new rustdoc needs to be able to create links to a given Currently, the new rustdoc works by recursively traversing the crate root I'm not sure that |
@nrc I realize that imports are already recorded in the analysis data, but I'm confused how to get the path that the import is at. I'm guessing rls-data/the compiler will have to be modified to include |
I would rather add a |
save-analysis: add parents to imports This PR populates the `parent` field added to `Import` in `rls-data` 0.14. I'm not quite sure if I handled nested imports' parents correctly: this is a new feature to me. r? @nrc cc rust-dev-tools/rls-analysis#123
I'm going to close this, as the upstream project (rustdoc2) is dormant. |
This is needed for the new rustdoc. Right now it is possible to get defs that are exported through
pub use
, but we have no way to distinguish them from naturally exported items.Ideally rustdoc would be able to get all defs and imports, and by looping through the imports, determine if the import is an export or a re-export of a given def.
What should the API for this look like?
The text was updated successfully, but these errors were encountered: