]> git.lizzy.rs Git - rust.git/commit
Get rid of `rustc_query_description!`
authorNilstrieb <48135649+Nilstrieb@users.noreply.github.com>
Mon, 10 Oct 2022 18:03:19 +0000 (20:03 +0200)
committernils <48135649+Nilstrieb@users.noreply.github.com>
Fri, 14 Oct 2022 20:35:56 +0000 (22:35 +0200)
commit167b3bd3b23bad1a8436f7a7a8637ec64d41acd6
tree8239fb89e62cd625be57da581e0a1e1e188fe8dd
parent1566273f482612fa5812ecb41d15a9c87a571465
Get rid of `rustc_query_description!`

Queries can provide an arbitrary expression for their description and
their caching behavior. Before, these expressions where stored in a
`rustc_query_description` macro emitted by the `rustc_queries` macro,
and then used in `rustc_query_impl` to fill out the methods for the
`QueryDescription` trait.

Instead, we now emit two new modules from `rustc_queries` containing the
functions with the expressions. `rustc_query_impl` calls these functions
now instead of invoking the macro.

Since we are now defining some of the functions in
`rustc_middle::query`, we now need all the imports for the key types
there as well.
compiler/rustc_macros/src/query.rs
compiler/rustc_middle/src/query/mod.rs
compiler/rustc_middle/src/ty/print/mod.rs
compiler/rustc_query_impl/src/lib.rs
compiler/rustc_query_impl/src/plumbing.rs