We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b88849d + 6101ddd commit 49cdf06Copy full SHA for 49cdf06
compiler/rustc_span/src/hygiene.rs
@@ -1291,11 +1291,11 @@ pub fn register_expn_id(
1291
let expn_id = ExpnId { krate, local_id };
1292
HygieneData::with(|hygiene_data| {
1293
let _old_data = hygiene_data.foreign_expn_data.insert(expn_id, data);
1294
- debug_assert!(_old_data.is_none());
+ debug_assert!(_old_data.is_none() || cfg!(parallel_compiler));
1295
let _old_hash = hygiene_data.foreign_expn_hashes.insert(expn_id, hash);
1296
- debug_assert!(_old_hash.is_none());
+ debug_assert!(_old_hash.is_none() || _old_hash == Some(hash));
1297
let _old_id = hygiene_data.expn_hash_to_expn_id.insert(hash, expn_id);
1298
- debug_assert!(_old_id.is_none());
+ debug_assert!(_old_id.is_none() || _old_id == Some(expn_id));
1299
});
1300
expn_id
1301
}
0 commit comments