Check that the old values match

This commit is contained in:
John Kåre Alsaker 2023-08-23 19:50:24 +02:00
parent d9f7005ab6
commit 6101ddd793

View File

@ -1279,9 +1279,9 @@ pub fn register_expn_id(
let _old_data = hygiene_data.foreign_expn_data.insert(expn_id, data);
debug_assert!(_old_data.is_none() || cfg!(parallel_compiler));
let _old_hash = hygiene_data.foreign_expn_hashes.insert(expn_id, hash);
debug_assert!(_old_hash.is_none() || cfg!(parallel_compiler));
debug_assert!(_old_hash.is_none() || _old_hash == Some(hash));
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
debug_assert!(_old_id.is_none() || cfg!(parallel_compiler));
debug_assert!(_old_id.is_none() || _old_id == Some(expn_id));
});
expn_id
}