Skip to content

Commit

Permalink
Merge #599
Browse files Browse the repository at this point in the history
599: Fix assertion for trait item mappings r=philberty a=philberty

These assertions defend against duplicate/bad mappings

Co-authored-by: Philip Herron <[email protected]>
  • Loading branch information
bors[bot] and philberty authored Jul 27, 2021
2 parents b992c80 + a9174d8 commit 9526e6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gcc/rust/util/rust-hir-map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void
Mappings::insert_hir_trait_item (CrateNum crateNum, HirId id,
HIR::TraitItem *item)
{
rust_assert (lookup_hir_item (crateNum, id) == nullptr);
rust_assert (lookup_hir_trait_item (crateNum, id) == nullptr);

hirTraitItemMappings[crateNum][id] = item;
nodeIdToHirMappings[crateNum][item->get_mappings ().get_nodeid ()] = id;
Expand Down

0 comments on commit 9526e6d

Please sign in to comment.