Skip to content

Commit 0ff1bb1

Browse files
committed
Update is_hir_id_module
1 parent 02b6df7 commit 0ff1bb1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/librustc/hir/map/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,9 +666,9 @@ impl<'hir> Map<'hir> {
666666

667667
/// Wether `hir_id` corresponds to a `mod` or a crate.
668668
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,
669+
match self.get_entry(hir_id) {
670+
Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. }
671+
| Entry { node: Node::Crate(..), .. } => true,
672672
_ => false,
673673
}
674674
}

0 commit comments

Comments
 (0)