rust/compiler
Aaron Hill c2946402ff
Properly re-use def path hash in incremental mode
Fixes #79661

In incremental compilation mode, we update a `DefPathHash -> DefId`
mapping every time we create a `DepNode` for a foreign `DefId`.
This mapping is written out to the on-disk incremental cache, and is
read by the next compilation session to allow us to lazily decode
`DefId`s.

When we decode a `DepNode` from the current incremental cache, we need
to ensure that any previously-recorded `DefPathHash -> DefId` mapping
gets recorded in the new mapping that we write out. However, PR #74967
didn't do this in all cases, leading to us being unable to decode a
`DefPathHash` in certain circumstances.

This PR refactors some of the code around `DepNode` deserialization to
prevent this kind of mistake from happening again.
2020-12-04 22:16:40 -05:00
..
rustc
rustc_apfloat
rustc_arena Use specialization to avoid copying 2020-11-20 21:02:09 +01:00
rustc_ast Add documentation for name_value_literal_span methods 2020-12-01 17:32:14 +01:00
rustc_ast_lowering Combination of commits 2020-12-03 09:50:10 -08:00
rustc_ast_passes Auto merge of #78296 - Aaron1011:fix/stmt-tokens, r=petrochenkov 2020-11-28 07:48:56 +00:00
rustc_ast_pretty Rollup merge of #79016 - fanzier:underscore-expressions, r=petrochenkov 2020-11-15 13:39:48 +01:00
rustc_attr Created NestedMetaItem::name_value_literal_span method 2020-12-01 16:26:51 +01:00
rustc_builtin_macros Properly handle attributes on statements 2020-11-26 17:08:35 -05:00
rustc_codegen_cranelift Merge commit '5988bbd24aa87732bfa1d111ba00bcdaa22c481a' into sync_cg_clif-2020-11-27 2020-11-27 20:48:53 +01:00
rustc_codegen_llvm Addressed feedback from 2020-12-01 2020-12-03 09:50:10 -08:00
rustc_codegen_ssa Combination of commits 2020-12-03 09:50:10 -08:00
rustc_data_structures Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
rustc_driver Fix unknown-crate when using self-profile with rustdoc 2020-12-01 12:54:03 -05:00
rustc_error_codes Auto merge of #79533 - sasurau4:feature/add-long-explanation-E0546, r=GuillaumeGomez 2020-12-03 05:18:36 +00:00
rustc_errors Rollup merge of #74293 - GuillaumeGomez:rustdoc-test-compiler-output-color, r=jyn514 2020-11-17 16:13:46 +01:00
rustc_expand Rollup merge of #79678 - jyn514:THE-PAPERCLIP-COMETH, r=varkor 2020-12-04 03:30:39 +01:00
rustc_feature Rename optin_builtin_traits to auto_traits 2020-11-23 14:14:06 -08:00
rustc_fs_util
rustc_graphviz
rustc_hir Fix some clippy lints 2020-12-03 17:08:19 -05:00
rustc_hir_pretty Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_incremental Auto merge of #74967 - Aaron1011:feature/incr-def-path-table, r=pnkfelix 2020-12-01 14:30:02 +00:00
rustc_index Stabilise then 2020-11-22 13:45:14 +00:00
rustc_infer The details of higher-rank sub are in the rustc book not a doc module. 2020-12-03 23:38:36 -06:00
rustc_interface Auto merge of #79586 - jyn514:crate-name, r=davidtwco 2020-12-03 12:14:29 +00:00
rustc_lexer Fix some clippy lints 2020-12-03 17:08:19 -05:00
rustc_lint Only deny doc_keyword in std and set it as "allow" by default 2020-12-03 16:48:17 +01:00
rustc_lint_defs lint-docs: Add --validate flag to validate lint docs separately. 2020-11-28 13:39:02 -08:00
rustc_llvm Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieu 2020-12-01 20:23:06 +00:00
rustc_macros Only create OnDiskCache in incremental compilation mode 2020-11-19 15:50:55 -05:00
rustc_metadata rustc_metadata: Remove some dead code 2020-12-03 00:05:24 +03:00
rustc_middle Properly re-use def path hash in incremental mode 2020-12-04 22:16:40 -05:00
rustc_mir Auto merge of #79686 - Dylan-DPC:rollup-leama5f, r=Dylan-DPC 2020-12-04 04:51:49 +00:00
rustc_mir_build Inline is_covered_by 2020-12-04 01:45:34 +00:00
rustc_parse Auto merge of #79364 - nico-abram:unstable-or-pat-suggestion, r=matthewjasper 2020-12-02 20:33:55 +00:00
rustc_parse_format
rustc_passes Add rustc_lexer as dependency to rustc_passes 2020-12-02 10:42:50 +01:00
rustc_plugin_impl Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_privacy Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_query_system Properly re-use def path hash in incremental mode 2020-12-04 22:16:40 -05:00
rustc_resolve Tweak diagnostics on shadowing lifetimes/labels 2020-12-02 11:39:42 +09:00
rustc_save_analysis Remove ForeignMod struct. 2020-11-26 21:32:27 +01:00
rustc_serialize Fix some clippy lints 2020-12-03 17:08:19 -05:00
rustc_session Combination of commits 2020-12-03 09:50:10 -08:00
rustc_span Rollup merge of #79678 - jyn514:THE-PAPERCLIP-COMETH, r=varkor 2020-12-04 03:30:39 +01:00
rustc_symbol_mangling Store ForeignItem in a side table. 2020-11-26 21:29:27 +01:00
rustc_target Auto merge of #78684 - devsnek:inline-asm-wasm, r=Amanieu 2020-12-01 20:23:06 +00:00
rustc_trait_selection Auto merge of #79637 - spastorino:revert-trait-inheritance-self, r=Mark-Simulacrum 2020-12-03 02:00:46 +00:00
rustc_traits Don't run resolve_vars_if_possible in normalize_erasing_regions 2020-11-18 12:25:36 -05:00
rustc_ty_utils Be cautious of calling upvar_tys before mir 2020-11-29 19:20:28 -05:00
rustc_typeck Writeback walks the HIR not the AST. 2020-12-03 23:38:36 -06:00