diff options
| author | bors <bors@rust-lang.org> | 2017-11-23 03:22:55 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-11-23 03:22:55 +0000 |
| commit | 10ef344d8c56563570a7647aa81e1586164f812b (patch) | |
| tree | 0f52e37e20e0eca4a6a7246a05465537d96b2dd7 /src/bootstrap | |
| parent | 6af4515de6c065bc4e4ac91035fbf51643172305 (diff) | |
| parent | 794ada06e7ad370ec48b4de69e43eb59d69543c9 (diff) | |
| download | rust-10ef344d8c56563570a7647aa81e1586164f812b.tar.gz rust-10ef344d8c56563570a7647aa81e1586164f812b.zip | |
Auto merge of #46011 - euclio:reachability-redux, r=nrc
Allow filtering analysis by reachability Fixes #43521. Fixes https://github.com/nrc/rls-analysis/issues/79. This PR allows a user to filter items present in the save-analysis data by setting the `reachable_only` config option. This option is intended for use by the new rustdoc. The PR isn't quite finished, because it's dependent on a new release of rls-data, but I want to make sure that the approach is valid. https://github.com/nrc/rls-analysis/issues/79 mentions that `pub use` might need to be handled, but my thinking is that the consumer of the analysis data would be able to infer which imports are `pub use`, and which items are only reachable through `pub use`, so that doesn't need to be handled here. r? @nrc
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bin/rustc.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs index 16a23eb364a..8325b1d2a27 100644 --- a/src/bootstrap/bin/rustc.rs +++ b/src/bootstrap/bin/rustc.rs @@ -183,7 +183,8 @@ fn main() { if env::var("RUSTC_SAVE_ANALYSIS") == Ok("api".to_string()) { cmd.arg("-Zsave-analysis"); cmd.env("RUST_SAVE_ANALYSIS_CONFIG", - "{\"output_file\": null,\"full_docs\": false,\"pub_only\": true,\ + "{\"output_file\": null,\"full_docs\": false,\ + \"pub_only\": true,\"reachable_only\": false,\ \"distro_crate\": true,\"signatures\": false,\"borrow_data\": false}"); } |
