diff options
| author | bors <bors@rust-lang.org> | 2021-03-10 21:54:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-03-10 21:54:06 +0000 |
| commit | 066f01d81bfbed746f6b6cf27a0426d829e8e832 (patch) | |
| tree | a4ae0ac888dd8a84e198ca68829f7f9a8020baf4 /compiler/rustc_codegen_llvm/src | |
| parent | f98721f886ab52d32d622ad0a46216ad03f3e525 (diff) | |
| parent | b7d91b0ae45698f56eef67cc60abcf2784a69cb5 (diff) | |
| download | rust-066f01d81bfbed746f6b6cf27a0426d829e8e832.tar.gz rust-066f01d81bfbed746f6b6cf27a0426d829e8e832.zip | |
Auto merge of #82960 - camelid:masked_crates, r=jyn514
Remove `masked_crates` from `clean::Crate` Previously, `masked_crates` existed both on `Cache` and on `clean::Crate`. During cache population, the `clean::Crate` version was `take`n and moved to `Cache`. This change removes the version on `clean::Crate` and instead directly mutates `Cache.masked_crates` to initialize it. This has the advantage of avoiding duplication and avoiding unnecessary allocation, as well as making the flow of information through rustdoc less confusing. The one downside I see is that `clean::utils::krate()` now uses the side effect of mutating `DocContext.cache` instead of returning the data directly, but it already mutated the `Cache` for other things (e.g., `deref_trait_did`) so it's not really new behavior. Also, `clean::utils::krate()` is only called once (and is meant to only be called once since it performs expensive and potentially destructive operations) so the mutation shouldn't be an issue. Follow-up to https://github.com/rust-lang/rust/pull/82018#discussion_r584197747. cc `@jyn514`
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
