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