Closed as not planned
Description
Uncovered by rust-dev-tools/rls-analysis#124.
For the following code:
pub use private::*;
mod private {
pub struct Struct1;
pub struct Struct2;
}
$ RUST_SAVE_ANALYSIS_CONFIG='{ "reachable_only": true, "full_docs": true, "pub_only": false, "distro_crate": false, "signatures": false, "borrow_data": false }' rustc -Zsave-analysis test.rs
The save analysis data for the glob use has an empty string for the value
, when I would expect Struct1
and Struct2
would be in the string.
The theory is that the glob_map
created by the librustc_resolve::Resolver
only contains imports actually used inside the module, but the save analysis data wants to include exports as well. The glob_map is used to create the value
field in the analysis here.
I'm happy to work and submit a PR for this, but I don't think that I understand enough about the resolve code to move forward, particularly around what causes an import to be considered "used". Could someone give me some help?