Previously, we were emittinng analysis data for all tasks, including `doc`. That meant we got two sets of save-analysis data, one from the normal build and one from the docs. That means indexing with the RLS took twice as long and made downloads larger and build times longer.
cc https://github.com/rust-lang-nursery/rls/issues/826
}
}
- if mode == Mode::Libstd && self.config.extended && compiler.is_final_stage(self) {
+ if cmd == "build" && mode == Mode::Libstd
+ && self.config.extended && compiler.is_final_stage(self)
+ {
cargo.env("RUSTC_SAVE_ANALYSIS", "api".to_string());
}