Skip to content

Commit ba7edb8

Browse files
committed
Do not cache constness, asyncness and fn_arg_names.
Those queries trivially read from HIR.
1 parent 63b17d5 commit ba7edb8

File tree

1 file changed

+1
-3
lines changed
  • compiler/rustc_middle/src/query

1 file changed

+1
-3
lines changed

compiler/rustc_middle/src/query/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -640,13 +640,11 @@ rustc_queries! {
640640
/// `is_const_fn` function. Consider using `is_const_fn` or `is_const_fn_raw` instead.
641641
query constness(key: DefId) -> hir::Constness {
642642
desc { |tcx| "checking if item is const: `{}`", tcx.def_path_str(key) }
643-
cache_on_disk_if { key.is_local() }
644643
separate_provide_extern
645644
}
646645

647646
query asyncness(key: DefId) -> hir::IsAsync {
648647
desc { |tcx| "checking if the function is async: `{}`", tcx.def_path_str(key) }
649-
cache_on_disk_if { key.is_local() }
650648
separate_provide_extern
651649
}
652650

@@ -1186,9 +1184,9 @@ rustc_queries! {
11861184

11871185
query fn_arg_names(def_id: DefId) -> &'tcx [rustc_span::symbol::Ident] {
11881186
desc { |tcx| "looking up function parameter names for `{}`", tcx.def_path_str(def_id) }
1189-
cache_on_disk_if { def_id.is_local() }
11901187
separate_provide_extern
11911188
}
1189+
11921190
/// Gets the rendered value of the specified constant or associated constant.
11931191
/// Used by rustdoc.
11941192
query rendered_const(def_id: DefId) -> String {

0 commit comments

Comments
 (0)