Fix ICE Caused by Incorrectly Delaying E0107
This commit is contained in:
parent
b58ce4e145
commit
3d5bd95558
2 changed files with 32 additions and 14 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue