about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/query
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/query
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/query')
-rw-r--r--compiler/rustc_middle/src/query/mod.rs6
1 files changed, 0 insertions, 6 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs
index 6d7e7ef0cb0..bf45269e06f 100644
--- a/compiler/rustc_middle/src/query/mod.rs
+++ b/compiler/rustc_middle/src/query/mod.rs
@@ -586,12 +586,6 @@ rustc_queries! {
         separate_provide_extern
     }
 
-    /// Returns `Some(mutability)` if the node pointed to by `def_id` is a static item.
-    query static_mutability(def_id: DefId) -> Option<hir::Mutability> {
-        desc { |tcx| "looking up static mutability of `{}`", tcx.def_path_str(def_id) }
-        separate_provide_extern
-    }
-
     /// Returns `Some(generator_kind)` if the node pointed to by `def_id` is a generator.
     query generator_kind(def_id: DefId) -> Option<hir::GeneratorKind> {
         desc { |tcx| "looking up generator kind of `{}`", tcx.def_path_str(def_id) }