rust/src/test
bors 2b681ac06b Auto merge of #92259 - Aaron1011:normal-mod-hashing, r=michaelwoerister
Remove special-cased stable hashing for HIR module

All other 'containers' (e.g. `impl` blocks) hashed their contents
in the normal, order-dependent way. However, `Mod` was hashing
its contents in a (sort-of) order-independent way. However, the
exact order is exposed to consumers through `Mod.item_ids`,
and through query results like `hir_module_items`. Therefore,
stable hashing needs to take the order of items into account,
to avoid fingerprint ICEs.

Unforuntately, I was unable to directly build a reproducer
for the ICE, due to the behavior of `Fingerprint::combine_commutative`.
This operation swaps the upper and lower `u64` when constructing the
result, which makes the function non-associative. Since we start
the hashing of module items by combining `Fingerprint::ZERO` with
the first item, it's difficult to actually build an example where
changing the order of module items leaves the final hash unchanged.

However, this appears to have been hit in practice in #92218
While we're not able to reproduce it, the fact that proc-macros
are involved (which can give an entire module the same span, preventing
any span-related invalidations) makes me confident that the root
cause of that issue is our method of hashing module items.

This PR removes all of the special handling for `Mod`, instead deriving
a `HashStable` implementation. This makes `Mod` consistent with other
'contains' like `Impl`, which hash their contents through the typical
derive of `HashStable`.
2022-01-04 00:25:23 +00:00
..
assembly Auto merge of #88354 - Jmc18134:hint-space-pauth-opt, r=nagisa 2021-12-29 22:35:11 +00:00
auxiliary
codegen Update references to -Z symbol-mangling-version to use -C 2022-01-01 15:53:11 -08:00
codegen-units Collect panic/panic_bounds_check during monomorphization 2021-10-30 18:21:44 +01:00
debuginfo tests: Ignore test/debuginfo/rc_arc.rs on windows-gnu 2021-11-28 23:09:33 +08:00
incremental Auto merge of #92259 - Aaron1011:normal-mod-hashing, r=michaelwoerister 2022-01-04 00:25:23 +00:00
mir-opt Use panic() instead of panic!() in some places in core. 2021-12-21 10:39:00 +01:00
pretty Move equal sign back into head ibox 2021-12-29 12:26:50 -08:00
run-make Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
run-make-fulldeps Update references to -Z symbol-mangling-version to use -C 2022-01-01 15:53:11 -08:00
run-pass-valgrind
rustdoc Rollup merge of #92332 - GuillaumeGomez:where-clause-order, r=jsha 2022-01-01 22:49:50 +01:00
rustdoc-gui Rollup merge of #92440 - GuillaumeGomez:fix-mobile-toggles, r=jsha 2021-12-31 23:14:49 +01:00
rustdoc-js Fix warnings in rustdoc JS tests 2021-11-28 11:49:12 -08:00
rustdoc-js-std
rustdoc-json Create rustdoc_internals feature gate 2021-11-24 21:57:18 +01:00
rustdoc-ui Add regression test for #59502 2021-12-28 14:09:20 -08:00
ui Rollup merge of #92444 - dtolnay:coremethods, r=joshtriplett 2022-01-03 14:44:21 +01:00
ui-fulldeps Remove unnecessary sigils around Ident::as_str() calls. 2021-12-15 17:32:42 +11:00
COMPILER_TESTS.md