Files
rust/compiler/rustc_query_impl
Nicholas Nethercote d863850574 Streamline cache-related query functions.
There are three query vtable functions related to the `cache_on_disk_if`
modifier:
- `will_cache_on_disk_for_key_fn`
- `try_load_from_disk_fn`
- `is_loadable_from_disk_fn`

These are all function ptrs within an `Option`. They each have a wrapper
that returns `false`/`None` if the function ptr is missing.

This commit removes the `Option` wrappers. In the `None` case we now set
the function ptr to a trivial closure that returns `false`/`None`. The
commit also removes some typedefs that each have a single use. All this
is a bit simpler, with less indirection.

Note that `QueryVTable::hash_value_fn` is still an `Option`. Unlike the
above three functions, which have trivial behaviour in the `None` case,
`hash_value_fn` is used in ways where the `Some`/`None` distinction is
more meaningful.
2026-03-04 20:57:02 +11:00
..