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
No known key found for this signature in database
GPG key ID: 6D017A96D8E6C2F9

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,