From: Camille GILLOT Date: Tue, 24 Mar 2020 22:48:37 +0000 (+0100) Subject: Simplify generics on try_start. X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=5dfed41812b3904c1f50bd11aa7047b29ee9f47a;p=rust.git Simplify generics on try_start. --- 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 @@ 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: QueryContext, + CTX: QueryContext, { let lock = &mut *lookup.lock; @@ -391,7 +390,7 @@ fn try_execute_query( 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 @@ fn force_query>( // 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)]