]> git.lizzy.rs Git - rust.git/commit - src/tools/rust-analyzer
Auto merge of #95524 - oli-obk:cached_stable_hash_cleanups, r=nnethercote
authorbors <bors@rust-lang.org>
Sat, 9 Apr 2022 02:31:24 +0000 (02:31 +0000)
committerbors <bors@rust-lang.org>
Sat, 9 Apr 2022 02:31:24 +0000 (02:31 +0000)
commite980c6295582792e4a7c2d67e33cece60c170115
tree0e52df53a2dba63646376b4f633f595652d05bd4
parent340f6491bed3525acfabbdbd1545b6aee2fca62b
parent25d6f8e0f647f865775158f35408724278145c50
Auto merge of #95524 - oli-obk:cached_stable_hash_cleanups, r=nnethercote

Cached stable hash cleanups

r? `@nnethercote`

Add a sanity assertion in debug mode to check that the cached hashes are actually the ones we get if we compute the hash each time.

Add a new data structure that bundles all the hash-caching work to make it easier to re-use it for different interned data structures
compiler/rustc_middle/src/ty/context.rs
compiler/rustc_middle/src/ty/layout.rs
compiler/rustc_middle/src/ty/mod.rs