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 Oct 26, 2021
1 parent 45856e6 commit 6f4cc96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/hir/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,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 6f4cc96

Please sign in to comment.