Add a useful comment about the `RawList` stable hash cache. I tried removing it to see what happened. Not a good idea!
diff --git a/compiler/rustc_middle/src/ty/impls_ty.rs b/compiler/rustc_middle/src/ty/impls_ty.rs index ac45ce8..95a1a1b 100644 --- a/compiler/rustc_middle/src/ty/impls_ty.rs +++ b/compiler/rustc_middle/src/ty/impls_ty.rs
@@ -20,6 +20,9 @@ impl<'a, 'tcx, H, T> HashStable<StableHashingContext<'a>> for &'tcx ty::list::Ra T: HashStable<StableHashingContext<'a>>, { fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) { + // Note: this cache makes an *enormous* performance difference on certain benchmarks. E.g. + // without it, compiling `diesel-2.2.10` can be 74% slower, and compiling + // `deeply-nested-multi` can be ~4,000x slower(!) thread_local! { static CACHE: RefCell<FxHashMap<(*const (), HashingControls), Fingerprint>> = RefCell::new(Default::default());