Skip to content

Commit 6f4cc96

Browse files
committed
Do not ICE when accesing large LocalDefId.
1 parent 45856e6 commit 6f4cc96

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

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

0 commit comments

Comments
 (0)