about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/ty/print
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-03-30 22:09:56 +0000
committerbors <bors@rust-lang.org>2022-03-30 22:09:56 +0000
commita40c595695bff3bfb373a8a3355ae4bd4ea64608 (patch)
tree8b2f8edf18e6557da3fdd81eec8726397af7a9eb /compiler/rustc_middle/src/ty/print
parentc5cf08d37b85f953b132951e868df5b924250fdc (diff)
parent21a554caf680b74ee6270d3a61b0336b643c5456 (diff)
downloadrust-a40c595695bff3bfb373a8a3355ae4bd4ea64608.tar.gz
rust-a40c595695bff3bfb373a8a3355ae4bd4ea64608.zip
Auto merge of #95436 - cjgillot:static-mut, r=oli-obk
Remember mutability in `DefKind::Static`.

This allows to compute the `BodyOwnerKind` from `DefKind` only, and
removes a direct dependency of some MIR queries onto HIR.

As a side effect, it also simplifies metadata, since we don't need 4
flavours of `EntryKind::*Static` any more.
Diffstat (limited to 'compiler/rustc_middle/src/ty/print')
-rw-r--r--compiler/rustc_middle/src/ty/print/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs
index fecc5d805fc..826000dcecf 100644
--- a/compiler/rustc_middle/src/ty/print/pretty.rs
+++ b/compiler/rustc_middle/src/ty/print/pretty.rs
@@ -1188,7 +1188,7 @@ pub trait PrettyPrinter<'tcx>:
             }
             ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted: None }) => {
                 match self.tcx().def_kind(def.did) {
-                    DefKind::Static | DefKind::Const | DefKind::AssocConst => {
+                    DefKind::Static(..) | DefKind::Const | DefKind::AssocConst => {
                         p!(print_value_path(def.did, substs))
                     }
                     _ => {