From 1761d88f4a39302ddc0c961811cb03ac02e01cf9 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 21 Oct 2021 15:24:29 +0000 Subject: [PATCH] Static items are also const --- compiler/rustc_hir/src/hir.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index c67d3df3ded..2b4403b37ff 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -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,