Skip to content

Commit ba46b68

Browse files
committed
Skip stable hashing without incremental.
1 parent 9d86e6a commit ba46b68

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compiler/rustc_middle/src/ty/context.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,9 @@ impl<'tcx> CtxtInterners<'tcx> {
192192

193193
// It's impossible to hash inference variables (and will ICE), so we don't need to try to cache them.
194194
// Without incremental, we rarely stable-hash types, so let's not do it proactively.
195-
let stable_hash = if flags.flags.intersects(TypeFlags::NEEDS_INFER) {
195+
let stable_hash = if flags.flags.intersects(TypeFlags::NEEDS_INFER)
196+
|| sess.opts.incremental.is_none()
197+
{
196198
Fingerprint::ZERO
197199
} else {
198200
let mut hasher = StableHasher::new();

0 commit comments

Comments
 (0)