diff options
| author | bors <bors@rust-lang.org> | 2023-05-02 17:49:39 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-05-02 17:49:39 +0000 |
| commit | a368898de758e1b8def6c9060044a5b40eb79e84 (patch) | |
| tree | 1768f6473983ad9f96fc467ace860e3498b71f72 | |
| parent | 9d795a6e6e19d56b235d1dbd4f5941404cf5918c (diff) | |
| parent | 37f7db87b06bc8de7af3249cb7fbc90736ddf3d0 (diff) | |
| download | rust-a368898de758e1b8def6c9060044a5b40eb79e84.tar.gz rust-a368898de758e1b8def6c9060044a5b40eb79e84.zip | |
Auto merge of #111028 - compiler-errors:attr-query-no-caching, r=cjgillot
Make some simple queries no longer cache on disk I don't think we need to cache queries with really simple local providers, like loading hir and accessing an attr r? `@ghost`
| -rw-r--r-- | compiler/rustc_middle/src/query/mod.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_middle/src/query/mod.rs b/compiler/rustc_middle/src/query/mod.rs index 111993ec7a8..be2657d25a6 100644 --- a/compiler/rustc_middle/src/query/mod.rs +++ b/compiler/rustc_middle/src/query/mod.rs @@ -617,13 +617,11 @@ rustc_queries! { /// `is_const_fn` function. Consider using `is_const_fn` or `is_const_fn_raw` instead. query constness(key: DefId) -> hir::Constness { desc { |tcx| "checking if item is const: `{}`", tcx.def_path_str(key) } - cache_on_disk_if { key.is_local() } separate_provide_extern } query asyncness(key: DefId) -> hir::IsAsync { desc { |tcx| "checking if the function is async: `{}`", tcx.def_path_str(key) } - cache_on_disk_if { key.is_local() } separate_provide_extern } @@ -641,14 +639,12 @@ rustc_queries! { /// Returns `true` if this is a foreign item (i.e., linked via `extern { ... }`). query is_foreign_item(key: DefId) -> bool { desc { |tcx| "checking if `{}` is a foreign item", tcx.def_path_str(key) } - cache_on_disk_if { key.is_local() } 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) } - cache_on_disk_if { def_id.is_local() } separate_provide_extern } @@ -747,7 +743,6 @@ rustc_queries! { } query impl_polarity(impl_id: DefId) -> ty::ImplPolarity { desc { |tcx| "computing implementation polarity of `{}`", tcx.def_path_str(impl_id) } - cache_on_disk_if { impl_id.is_local() } separate_provide_extern } @@ -879,7 +874,6 @@ rustc_queries! { } query diagnostic_only_typeck(key: LocalDefId) -> &'tcx ty::TypeckResults<'tcx> { desc { |tcx| "type-checking `{}`", tcx.def_path_str(key) } - cache_on_disk_if { true } } query used_trait_imports(key: LocalDefId) -> &'tcx UnordSet<LocalDefId> { @@ -1144,7 +1138,6 @@ rustc_queries! { query fn_arg_names(def_id: DefId) -> &'tcx [rustc_span::symbol::Ident] { desc { |tcx| "looking up function parameter names for `{}`", tcx.def_path_str(def_id) } - cache_on_disk_if { def_id.is_local() } separate_provide_extern } /// Gets the rendered value of the specified constant or associated constant. @@ -1152,12 +1145,10 @@ rustc_queries! { query rendered_const(def_id: DefId) -> &'tcx String { arena_cache desc { |tcx| "rendering constant initializer of `{}`", tcx.def_path_str(def_id) } - cache_on_disk_if { def_id.is_local() } separate_provide_extern } query impl_parent(def_id: DefId) -> Option<DefId> { desc { |tcx| "computing specialization parent impl of `{}`", tcx.def_path_str(def_id) } - cache_on_disk_if { def_id.is_local() } separate_provide_extern } @@ -1410,7 +1401,6 @@ rustc_queries! { query impl_defaultness(def_id: DefId) -> hir::Defaultness { desc { |tcx| "looking up whether `{}` is a default impl", tcx.def_path_str(def_id) } - cache_on_disk_if { def_id.is_local() } separate_provide_extern feedable } |
