Skip to content

Commit

Permalink
Static items are also const
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk authored and fee1-dead committed Nov 29, 2021
1 parent 721ffd1 commit 1761d88
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions compiler/rustc_hir/src/hir.rs
Expand Up @@ -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,

Expand Down

0 comments on commit 1761d88

Please sign in to comment.