Skip to content

Commit 21942a5

Browse files
committed
Update is_hir_id_module
1 parent 9c4308e commit 21942a5

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
@@ -667,9 +667,9 @@ impl<'hir> Map<'hir> {
667667

668668
/// Whether `hir_id` corresponds to a `mod` or a crate.
669669
pub fn is_hir_id_module(&self, hir_id: HirId) -> bool {
670-
match self.lookup(hir_id) {
671-
Some(Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. })
672-
| Some(Entry { node: Node::Crate(..), .. }) => true,
670+
match self.get_entry(hir_id) {
671+
Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. }
672+
| Entry { node: Node::Crate(..), .. } => true,
673673
_ => false,
674674
}
675675
}

0 commit comments

Comments
 (0)