Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 0bf5cae

Browse files
committed
Remove __query_compute module.
1 parent 97eda01 commit 0bf5cae

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

src/librustc/ty/query/plumbing.rs

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -951,16 +951,6 @@ macro_rules! define_queries_inner {
951951
})*
952952
}
953953

954-
// This module and the functions in it exist only to provide a
955-
// predictable symbol name prefix for query providers. This is helpful
956-
// for analyzing queries in profilers.
957-
pub(super) mod __query_compute {
958-
$(#[inline(never)]
959-
pub fn $name<F: FnOnce() -> R, R>(f: F) -> R {
960-
f()
961-
})*
962-
}
963-
964954
$(impl<$tcx> QueryConfig<$tcx> for queries::$name<$tcx> {
965955
type Key = $K;
966956
type Value = $V;
@@ -997,16 +987,14 @@ macro_rules! define_queries_inner {
997987

998988
#[inline]
999989
fn compute(tcx: TyCtxt<'tcx>, key: Self::Key) -> Self::Value {
1000-
__query_compute::$name(move || {
1001-
let provider = tcx.queries.providers.get(key.query_crate())
1002-
// HACK(eddyb) it's possible crates may be loaded after
1003-
// the query engine is created, and because crate loading
1004-
// is not yet integrated with the query engine, such crates
1005-
// would be missing appropriate entries in `providers`.
1006-
.unwrap_or(&tcx.queries.fallback_extern_providers)
1007-
.$name;
1008-
provider(tcx, key)
1009-
})
990+
let provider = tcx.queries.providers.get(key.query_crate())
991+
// HACK(eddyb) it's possible crates may be loaded after
992+
// the query engine is created, and because crate loading
993+
// is not yet integrated with the query engine, such crates
994+
// would be missing appropriate entries in `providers`.
995+
.unwrap_or(&tcx.queries.fallback_extern_providers)
996+
.$name;
997+
provider(tcx, key)
1010998
}
1011999

10121000
fn hash_result(

0 commit comments

Comments
 (0)