Remove __query_compute module.
This commit is contained in:
parent
97eda01bb7
commit
0bf5cae489
1 changed files with 8 additions and 20 deletions
|
|
@ -951,16 +951,6 @@ macro_rules! define_queries_inner {
|
|||
})*
|
||||
}
|
||||
|
||||
// This module and the functions in it exist only to provide a
|
||||
// predictable symbol name prefix for query providers. This is helpful
|
||||
// for analyzing queries in profilers.
|
||||
pub(super) mod __query_compute {
|
||||
$(#[inline(never)]
|
||||
pub fn $name<F: FnOnce() -> R, R>(f: F) -> R {
|
||||
f()
|
||||
})*
|
||||
}
|
||||
|
||||
$(impl<$tcx> QueryConfig<$tcx> for queries::$name<$tcx> {
|
||||
type Key = $K;
|
||||
type Value = $V;
|
||||
|
|
@ -997,16 +987,14 @@ macro_rules! define_queries_inner {
|
|||
|
||||
#[inline]
|
||||
fn compute(tcx: TyCtxt<'tcx>, key: Self::Key) -> Self::Value {
|
||||
__query_compute::$name(move || {
|
||||
let provider = tcx.queries.providers.get(key.query_crate())
|
||||
// HACK(eddyb) it's possible crates may be loaded after
|
||||
// the query engine is created, and because crate loading
|
||||
// is not yet integrated with the query engine, such crates
|
||||
// would be missing appropriate entries in `providers`.
|
||||
.unwrap_or(&tcx.queries.fallback_extern_providers)
|
||||
.$name;
|
||||
provider(tcx, key)
|
||||
})
|
||||
let provider = tcx.queries.providers.get(key.query_crate())
|
||||
// HACK(eddyb) it's possible crates may be loaded after
|
||||
// the query engine is created, and because crate loading
|
||||
// is not yet integrated with the query engine, such crates
|
||||
// would be missing appropriate entries in `providers`.
|
||||
.unwrap_or(&tcx.queries.fallback_extern_providers)
|
||||
.$name;
|
||||
provider(tcx, key)
|
||||
}
|
||||
|
||||
fn hash_result(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue