rust-refactor
rust-refactor copied to clipboard
Expand global imports (only including the ones used)
@nrc I noticed librustc_trans/save doesn't collect information about use statements. Do we need to add a UseData or should we work directly with rustc_resolve?
There is this for globs which does what you want (I believe): https://dxr.mozilla.org/rust/source/src/librustc_trans/save/dump_csv.rs#857-879 (other than rewriting the source code itself). You would want to move it from dump_csv to the API (or just read it from the csv file).