From 21a554caf680b74ee6270d3a61b0336b643c5456 Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 29 Mar 2022 17:11:12 +0200 Subject: 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. --- compiler/rustc_middle/src/query/mod.rs | 6 ------ 1 file changed, 6 deletions(-) (limited to 'compiler/rustc_middle/src/query') diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 95260e9e917..783fe970679 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 { - 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 { desc { |tcx| "looking up generator kind of `{}`", tcx.def_path_str(def_id) } -- cgit 1.4.1-3-g733a5