From 5dfed41812b3904c1f50bd11aa7047b29ee9f47a Mon Sep 17 00:00:00 2001 From: Camille GILLOT Date: Tue, 24 Mar 2020 23:48:37 +0100 Subject: [PATCH] Simplify generics on try_start. --- src/librustc_query_system/query/plumbing.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/librustc_query_system/query/plumbing.rs b/src/librustc_query_system/query/plumbing.rs index 1bba4bd7e88..e1b86e55ce8 100644 --- a/src/librustc_query_system/query/plumbing.rs +++ b/src/librustc_query_system/query/plumbing.rs @@ -168,16 +168,15 @@ where /// 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: QueryContext, + CTX: QueryContext, { let lock = &mut *lookup.lock; @@ -391,7 +390,7 @@ where Q: QueryDescription, CTX: QueryContext, { - let job = match JobOwner::try_start::(tcx, span, &key, lookup) { + let job = match JobOwner::try_start::(tcx, span, &key, lookup) { TryGetJob::NotYetStarted(job) => job, TryGetJob::Cycle(result) => return result, #[cfg(parallel_compiler)] @@ -697,7 +696,7 @@ where // Cache hit, do nothing }, |key, lookup| { - let job = match JobOwner::try_start::(self, span, &key, lookup) { + let job = match JobOwner::try_start::(self, span, &key, lookup) { TryGetJob::NotYetStarted(job) => job, TryGetJob::Cycle(_) => return, #[cfg(parallel_compiler)]