We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45856e6 commit 6f4cc96Copy full SHA for 6f4cc96
compiler/rustc_middle/src/hir/mod.rs
@@ -65,7 +65,7 @@ pub fn provide(providers: &mut Providers) {
65
providers.crate_hash = map::crate_hash;
66
providers.hir_module_items = map::hir_module_items;
67
providers.hir_owner = |tcx, id| {
68
- let owner = tcx.hir_crate(()).owners[id].as_ref()?;
+ let owner = tcx.hir_crate(()).owners.get(id)?.as_ref()?;
69
let node = owner.node();
70
Some(Owner { node, hash_without_bodies: owner.nodes.hash_without_bodies })
71
};
0 commit comments