]> git.lizzy.rs Git - rust.git/commitdiff
Remove __query_compute module.
authorCamille GILLOT <gillot.camille@gmail.com>
Fri, 6 Mar 2020 20:36:09 +0000 (21:36 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Mon, 16 Mar 2020 08:07:58 +0000 (09:07 +0100)
src/librustc/ty/query/plumbing.rs

index acf67f52dceaa94ebe9bb50ebd6a4979e78cf73c..bfae0075c8d076732ae287e3a220096cbb0907f0 100644 (file)
@@ -951,16 +951,6 @@ pub struct $name<$tcx> {
             })*
         }
 
-        // 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 @@ fn dep_kind() -> dep_graph::DepKind {
 
             #[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(