diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-07-27 12:23:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 12:23:09 +0000 |
commit | 9526e6d62167ff824814c7ac8c09b36316029262 (patch) | |
tree | 07227e58a647830744767a55af71340877077e23 /gcc | |
parent | b992c8058c0ffb1866e97e5a2acc55b632773b53 (diff) | |
parent | a9174d87f526139e1014689f66936cb485569456 (diff) | |
download | gcc-9526e6d62167ff824814c7ac8c09b36316029262.zip gcc-9526e6d62167ff824814c7ac8c09b36316029262.tar.gz gcc-9526e6d62167ff824814c7ac8c09b36316029262.tar.bz2 |
Merge #599
599: Fix assertion for trait item mappings r=philberty a=philberty
These assertions defend against duplicate/bad mappings
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-hir-map.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/rust/util/rust-hir-map.cc b/gcc/rust/util/rust-hir-map.cc index 9af77a9..40b5167 100644 --- a/gcc/rust/util/rust-hir-map.cc +++ b/gcc/rust/util/rust-hir-map.cc @@ -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; |