diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-24 23:48:37 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-26 09:40:51 +0100 |
| commit | 5dfed41812b3904c1f50bd11aa7047b29ee9f47a (patch) | |
| tree | 46a685d8fdb0d3dfe83302be99509f1419588807 | |
| parent | fa06cfd25b2f53d01eb92605caac8d39cbb57ab0 (diff) | |
| download | rust-5dfed41812b3904c1f50bd11aa7047b29ee9f47a.tar.gz rust-5dfed41812b3904c1f50bd11aa7047b29ee9f47a.zip | |
Simplify generics on try_start.
| -rw-r--r-- | src/librustc_query_system/query/plumbing.rs | 9 |
1 files 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, Key = C::Key, Value = C::Value, Cache = C>, - CTX: QueryContext<DepKind = K>, + CTX: QueryContext, { let lock = &mut *lookup.lock; @@ -391,7 +390,7 @@ where 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 @@ where // 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)] |
