]> git.lizzy.rs Git - rust.git/commitdiff
Simplify generics on try_start.
authorCamille GILLOT <gillot.camille@gmail.com>
Tue, 24 Mar 2020 22:48:37 +0000 (23:48 +0100)
committerCamille GILLOT <gillot.camille@gmail.com>
Thu, 26 Mar 2020 08:40:51 +0000 (09:40 +0100)
src/librustc_query_system/query/plumbing.rs

index 1bba4bd7e8816dbbf86c1df806adb080f1e0a15c..e1b86e55ce8cfa7abd273488e06640823d1a9d6a 100644 (file)
@@ -168,16 +168,15 @@ impl<'tcx, CTX: QueryContext, C> JobOwner<'tcx, CTX, C>
     /// This function is inlined because that results in a noticeable speed-up
     /// for some compile-time benchmarks.
     #[inline(always)]
-    fn try_start<'a, 'b, Q, K>(
+    fn try_start<'a, 'b, Q>(
         tcx: CTX,
         span: Span,
         key: &C::Key,
         mut lookup: QueryLookup<'a, CTX, C::Key, C::Sharded>,
     ) -> TryGetJob<'b, CTX, C>
     where
-        K: DepKind,
         Q: QueryDescription<CTX, Key = C::Key, Value = C::Value, Cache = C>,
-        CTX: QueryContext<DepKind = K>,
+        CTX: QueryContext,
     {
         let lock = &mut *lookup.lock;
 
@@ -391,7 +390,7 @@ fn try_execute_query<Q, CTX>(
     Q: QueryDescription<CTX>,
     CTX: QueryContext,
 {
-    let job = match JobOwner::try_start::<Q, _>(tcx, span, &key, lookup) {
+    let job = match JobOwner::try_start::<Q>(tcx, span, &key, lookup) {
         TryGetJob::NotYetStarted(job) => job,
         TryGetJob::Cycle(result) => return result,
         #[cfg(parallel_compiler)]
@@ -697,7 +696,7 @@ fn force_query<Q: QueryDescription<Self>>(
                 // Cache hit, do nothing
             },
             |key, lookup| {
-                let job = match JobOwner::try_start::<Q, _>(self, span, &key, lookup) {
+                let job = match JobOwner::try_start::<Q>(self, span, &key, lookup) {
                     TryGetJob::NotYetStarted(job) => job,
                     TryGetJob::Cycle(_) => return,
                     #[cfg(parallel_compiler)]