1
Fork 0

Fix ICE Caused by Incorrectly Delaying E0107

This commit is contained in:
Veera 2024-07-29 21:47:42 -04:00
parent b58ce4e145
commit 3d5bd95558
2 changed files with 32 additions and 14 deletions

View file

@ -3689,6 +3689,11 @@ impl<'hir> OwnerNode<'hir> {
}
}
/// Check if node is an impl block.
pub fn is_impl_block(&self) -> bool {
matches!(self, OwnerNode::Item(Item { kind: ItemKind::Impl(_), .. }))
}
expect_methods_self! {
expect_item, &'hir Item<'hir>, OwnerNode::Item(n), n;
expect_foreign_item, &'hir ForeignItem<'hir>, OwnerNode::ForeignItem(n), n;