rust/compiler
bors d63a8d965e Auto merge of #92278 - Aaron1011:fix-fingerprint-caching, r=michaelwoerister
Ensure that `Fingerprint` caching respects hashing configuration

Fixes #92266

In some `HashStable` impls, we use a cache to avoid re-computing
the same `Fingerprint` from the same structure (e.g. an `AdtDef`).
However, the `StableHashingContext` used can be configured to
perform hashing in different ways (e.g. skipping `Span`s). This
configuration information is not included in the cache key,
which will cause an incorrect `Fingerprint` to be used if
we hash the same structure with different `StableHashingContext`
settings.

To fix this, the configuration settings of `StableHashingContext`
are split out into a separate `HashingControls` struct. This
struct is used as part of the cache key, ensuring that our caches
always produce the correct result for the given settings.

With this in place, we now turn off `Span` hashing during the
entire process of computing the hash included in legacy symbols.
This current has no effect, but will matter when a future PR
starts hashing more `Span`s that we currently skip.
2022-01-10 00:26:07 +00:00
..
rustc
rustc_apfloat
rustc_arena
rustc_ast expand: Refactor InvocationCollector visitor for better code reuse 2022-01-07 14:41:22 +08:00
rustc_ast_lowering Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU 2022-01-04 21:23:06 +01:00
rustc_ast_passes
rustc_ast_pretty Rollup merge of #92336 - dtolnay:printstateself, r=michaelwoerister 2022-01-07 20:20:56 -08:00
rustc_attr
rustc_borrowck
rustc_builtin_macros
rustc_codegen_cranelift
rustc_codegen_gcc
rustc_codegen_llvm Rollup merge of #92375 - wesleywiser:consolidate_debuginfo_msvc_check, r=michaelwoerister 2022-01-07 20:20:58 -08:00
rustc_codegen_ssa Rollup merge of #92375 - wesleywiser:consolidate_debuginfo_msvc_check, r=michaelwoerister 2022-01-07 20:20:58 -08:00
rustc_const_eval rename StackPopClean::None to Root 2022-01-04 11:13:08 +01:00
rustc_data_structures Ensure that Fingerprint caching respects hashing configuration 2022-01-05 10:13:28 -05:00
rustc_driver Rollup merge of #92504 - dtolnay:wall, r=jackh726 2022-01-06 23:15:17 +01:00
rustc_error_codes
rustc_errors
rustc_expand expand: Import more AST enums 2022-01-07 14:54:16 +08:00
rustc_feature
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #92534 - Aaron1011:hash-hir, r=petrochenkov 2022-01-09 16:03:41 +00:00
rustc_hir_pretty Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU 2022-01-04 21:23:06 +01:00
rustc_incremental
rustc_index
rustc_infer Suggest changing quotes when str/char type mismatch 2022-01-03 22:08:08 -08:00
rustc_interface ast: Always keep a NodeId in ast::Crate 2022-01-05 17:09:37 +08:00
rustc_lexer
rustc_lint
rustc_lint_defs
rustc_llvm Rollup merge of #92559 - durin42:llvm-14-attributemask, r=nikic 2022-01-06 23:15:18 +01:00
rustc_log Make rustc_log doc test runnable 2022-01-03 22:31:56 -08:00
rustc_macros
rustc_metadata Auto merge of #92690 - matthiaskrgr:rollup-rw0oz05, r=matthiaskrgr 2022-01-09 12:43:37 +00:00
rustc_middle Auto merge of #92278 - Aaron1011:fix-fingerprint-caching, r=michaelwoerister 2022-01-10 00:26:07 +00:00
rustc_mir_build Rollup merge of #91907 - lcnr:const-arg-infer, r=BoxyUwU 2022-01-04 21:23:06 +01:00
rustc_mir_dataflow
rustc_mir_transform Rollup merge of #92207 - tmiasko:delay-drop-elaboration-bug, r=jackh726 2022-01-06 23:15:14 +01:00
rustc_monomorphize Add query to avoid name comparison in leaf_def 2022-01-07 13:31:36 -08:00
rustc_parse ast: Always keep a NodeId in ast::Crate 2022-01-05 17:09:37 +08:00
rustc_parse_format
rustc_passes Add query to avoid name comparison in leaf_def 2022-01-07 13:31:36 -08:00
rustc_plugin_impl
rustc_privacy rustc_middle: Rename Export to ModChild and add some comments 2022-01-09 09:22:07 +08:00
rustc_query_impl
rustc_query_system Auto merge of #92278 - Aaron1011:fix-fingerprint-caching, r=michaelwoerister 2022-01-10 00:26:07 +00:00
rustc_resolve Auto merge of #92690 - matthiaskrgr:rollup-rw0oz05, r=matthiaskrgr 2022-01-09 12:43:37 +00:00
rustc_save_analysis Add trait_item_def_id to AssocItem 2022-01-07 12:28:12 -08:00
rustc_serialize
rustc_session sess/cg: re-introduce split dwarf kind 2022-01-06 09:32:42 +00:00
rustc_span Auto merge of #92278 - Aaron1011:fix-fingerprint-caching, r=michaelwoerister 2022-01-10 00:26:07 +00:00
rustc_symbol_mangling Ensure that Fingerprint caching respects hashing configuration 2022-01-05 10:13:28 -05:00
rustc_target sess/cg: re-introduce split dwarf kind 2022-01-06 09:32:42 +00:00
rustc_trait_selection Add query to avoid name comparison in leaf_def 2022-01-07 13:31:36 -08:00
rustc_traits Add trait_item_def_id to AssocItem 2022-01-07 12:28:12 -08:00
rustc_ty_utils Add query to avoid name comparison in leaf_def 2022-01-07 13:31:36 -08:00
rustc_type_ir
rustc_typeck rustc_metadata: Rename item_children(_untracked) to module_children(_untracked) 2022-01-09 09:22:06 +08:00