X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_middle%2Fsrc%2Fhir%2Fmap%2Fcollector.rs;h=7c2c2d13e981476654eee37fccdc5d6f08209c86;hb=e8b2e7b01ce9415f448318e4acc161195efcfbb6;hp=a5ffa9c7a54b0529760daf2600e405ec6f634f15;hpb=e952db8fd02090a10024ae63ba9d34e3b9cef898;p=rust.git diff --git a/compiler/rustc_middle/src/hir/map/collector.rs b/compiler/rustc_middle/src/hir/map/collector.rs index a5ffa9c7a54..7c2c2d13e98 100644 --- a/compiler/rustc_middle/src/hir/map/collector.rs +++ b/compiler/rustc_middle/src/hir/map/collector.rs @@ -52,6 +52,7 @@ fn insert_vec_map(map: &mut IndexVec>, k: K, v: V if i >= len { map.extend(repeat(None).take(i - len + 1)); } + debug_assert!(map[k].is_none()); map[k] = Some(v); } @@ -116,6 +117,7 @@ pub(super) fn root( modules: _, proc_macros: _, trait_map: _, + attrs: _, } = *krate; hash_body(&mut hcx, root_mod_def_path_hash, item, &mut hir_body_nodes) @@ -215,9 +217,7 @@ fn insert_entry(&mut self, id: HirId, entry: Entry<'hir>, hash: Fingerprint) { // Overwrite the dummy hash with the real HIR owner hash. nodes.hash = hash; - // FIXME: feature(impl_trait_in_bindings) broken and trigger this assert - //assert!(data.signature.is_none()); - + debug_assert!(data.signature.is_none()); data.signature = Some(self.arena.alloc(Owner { parent: entry.parent, node: entry.node })); } else {