Skip to content

Commit

Permalink
Do not ICE when accesing large LocalDefId.
Browse files Browse the repository at this point in the history
  • Loading branch information
cjgillot committed Jan 15, 2022
1 parent 67727aa commit d9c6e70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/hir/mod.rs
Expand Up @@ -64,7 +64,7 @@ pub fn provide(providers: &mut Providers) {
providers.crate_hash = map::crate_hash;
providers.hir_module_items = map::hir_module_items;
providers.hir_owner = |tcx, id| {
let owner = tcx.hir_crate(()).owners[id].as_ref()?;
let owner = tcx.hir_crate(()).owners.get(id)?.as_ref()?;
let node = owner.node();
Some(Owner { node, hash_without_bodies: owner.nodes.hash_without_bodies })
};
Expand Down

0 comments on commit d9c6e70

Please sign in to comment.