Skip to content

Commit d9c6e70

Browse files
committed
Do not ICE when accesing large LocalDefId.
1 parent 67727aa commit d9c6e70

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_middle/src/hir

1 file changed

+1
-1
lines changed

compiler/rustc_middle/src/hir/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub fn provide(providers: &mut Providers) {
6464
providers.crate_hash = map::crate_hash;
6565
providers.hir_module_items = map::hir_module_items;
6666
providers.hir_owner = |tcx, id| {
67-
let owner = tcx.hir_crate(()).owners[id].as_ref()?;
67+
let owner = tcx.hir_crate(()).owners.get(id)?.as_ref()?;
6868
let node = owner.node();
6969
Some(Owner { node, hash_without_bodies: owner.nodes.hash_without_bodies })
7070
};

0 commit comments

Comments
 (0)