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.
This commit is contained in:
Zalathar
2026-03-24 15:07:04 +11:00
parent 0e95a0f4c6
commit eb5a4000ff
+3 -1
View File
@@ -1436,8 +1436,10 @@
query def_kind(def_id: DefId) -> DefKind {
desc { "looking up definition kind of `{}`", tcx.def_path_str(def_id) }
cache_on_disk
separate_provide_extern
// This query has no local provider. For defs in the current crate,
// its value is always set by feeding when the `DefId` is created,
// usually in `TyCtxt::create_def`.
feedable
}