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 9c4308e commit 21942a5Copy full SHA for 21942a5
src/librustc/hir/map/mod.rs
@@ -667,9 +667,9 @@ impl<'hir> Map<'hir> {
667
668
/// Whether `hir_id` corresponds to a `mod` or a crate.
669
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,
+ match self.get_entry(hir_id) {
+ Entry { node: Node::Item(Item { kind: ItemKind::Mod(_), .. }), .. }
+ | Entry { node: Node::Crate(..), .. } => true,
673
_ => false,
674
}
675
0 commit comments