Skip to content

Commit eb5a400

Browse files
committed
Don't use disk-cache for query def_kind
From what I can tell, the `def_kind` query has no local provider, and is always given its value via query feeding, usually from `TyCtxt::create_def`. If that's the case, there should never be any opportunity for a previous value to be loaded from disk-cache, so serializing the current-session values is a waste of time.
1 parent 0e95a0f commit eb5a400

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

compiler/rustc_middle/src/queries.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,8 +1436,10 @@ rustc_queries! {
14361436

14371437
query def_kind(def_id: DefId) -> DefKind {
14381438
desc { "looking up definition kind of `{}`", tcx.def_path_str(def_id) }
1439-
cache_on_disk
14401439
separate_provide_extern
1440+
// This query has no local provider. For defs in the current crate,
1441+
// its value is always set by feeding when the `DefId` is created,
1442+
// usually in `TyCtxt::create_def`.
14411443
feedable
14421444
}
14431445

0 commit comments

Comments
 (0)