Skip to content

Commit 6101ddd

Browse files
committed
Check that the old values match
1 parent d9f7005 commit 6101ddd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/rustc_span/src/hygiene.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1279,9 +1279,9 @@ pub fn register_expn_id(
12791279
let _old_data = hygiene_data.foreign_expn_data.insert(expn_id, data);
12801280
debug_assert!(_old_data.is_none() || cfg!(parallel_compiler));
12811281
let _old_hash = hygiene_data.foreign_expn_hashes.insert(expn_id, hash);
1282-
debug_assert!(_old_hash.is_none() || cfg!(parallel_compiler));
1282+
debug_assert!(_old_hash.is_none() || _old_hash == Some(hash));
12831283
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1284-
debug_assert!(_old_id.is_none() || cfg!(parallel_compiler));
1284+
debug_assert!(_old_id.is_none() || _old_id == Some(expn_id));
12851285
});
12861286
expn_id
12871287
}

0 commit comments

Comments
 (0)