Skip to content

Commit 2b9b78a

Browse files
committed
add AnonConst as potential parent_item
1 parent 413a129 commit 2b9b78a

File tree

1 file changed

+2
-1
lines changed
  • src/librustc_middle/hir/map

1 file changed

+2
-1
lines changed

src/librustc_middle/hir/map/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,8 @@ impl<'hir> Map<'hir> {
641641
pub fn get_parent_item(&self, hir_id: HirId) -> HirId {
642642
for (hir_id, node) in self.parent_iter(hir_id) {
643643
match node {
644-
Node::Crate(_)
644+
Node::AnonConst(_)
645+
| Node::Crate(_)
645646
| Node::Item(_)
646647
| Node::ForeignItem(_)
647648
| Node::TraitItem(_)

0 commit comments

Comments
 (0)