Static items are also const

This commit is contained in:
Oli Scherer
2021-10-21 15:24:29 +00:00
committed by Deadbeef
parent 721ffd14c3
commit 1761d88f4a

View File

@@ -3246,6 +3246,7 @@ impl<'hir> Node<'hir> {
| Node::Item(Item { kind: ItemKind::Impl(Impl { constness, .. }), .. }) => *constness,
Node::Item(Item { kind: ItemKind::Const(..), .. })
| Node::Item(Item { kind: ItemKind::Static(..), .. })
| Node::TraitItem(TraitItem { kind: TraitItemKind::Const(..), .. })
| Node::ImplItem(ImplItem { kind: ImplItemKind::Const(..), .. }) => Constness::Const,