diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2022-11-11 20:03:33 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2022-11-11 20:03:33 +0000 |
| commit | ba46b6837367204e0ae4ba020a788df06dc2ebd8 (patch) | |
| tree | 0b7fe37941781bb400e633852316f04bd4c9195f | |
| parent | 9d86e6abaf972bf3a31a8e5e3d948b7d5bf0d289 (diff) | |
| download | rust-ba46b6837367204e0ae4ba020a788df06dc2ebd8.tar.gz rust-ba46b6837367204e0ae4ba020a788df06dc2ebd8.zip | |
Skip stable hashing without incremental.
| -rw-r--r-- | compiler/rustc_middle/src/ty/context.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs index 0ac712565b5..8f96f5a9eb3 100644 --- a/compiler/rustc_middle/src/ty/context.rs +++ b/compiler/rustc_middle/src/ty/context.rs @@ -192,7 +192,9 @@ impl<'tcx> CtxtInterners<'tcx> { // It's impossible to hash inference variables (and will ICE), so we don't need to try to cache them. // Without incremental, we rarely stable-hash types, so let's not do it proactively. - let stable_hash = if flags.flags.intersects(TypeFlags::NEEDS_INFER) { + let stable_hash = if flags.flags.intersects(TypeFlags::NEEDS_INFER) + || sess.opts.incremental.is_none() + { Fingerprint::ZERO } else { let mut hasher = StableHasher::new(); |
