We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_hir_id_module
1 parent 02b6df7 commit 0ff1bb1Copy full SHA for 0ff1bb1
src/librustc/hir/map/mod.rs
@@ -666,9 +666,9 @@ impl<'hir> Map<'hir> {
666
667
/// Wether `hir_id` corresponds to a `mod` or a crate.
668
pub fn is_hir_id_module(&self, hir_id: HirId) -> bool {
669
- match self.lookup(hir_id) {
670
- Some(Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. })
671
- | Some(Entry { node: Node::Crate(..), .. }) => true,
+ match self.get_entry(hir_id) {
+ Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. }
+ | Entry { node: Node::Crate(..), .. } => true,
672
_ => false,
673
}
674
0 commit comments