Skip to content

Commit

Permalink
Check that the old values match
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Aug 23, 2023
1 parent d9f7005 commit 6101ddd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_span/src/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6101ddd

Please sign in to comment.