Skip to content

Commit 5dfed41

Browse files
committed
Simplify generics on try_start.
1 parent fa06cfd commit 5dfed41

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/librustc_query_system/query/plumbing.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,15 @@ where
168168
/// This function is inlined because that results in a noticeable speed-up
169169
/// for some compile-time benchmarks.
170170
#[inline(always)]
171-
fn try_start<'a, 'b, Q, K>(
171+
fn try_start<'a, 'b, Q>(
172172
tcx: CTX,
173173
span: Span,
174174
key: &C::Key,
175175
mut lookup: QueryLookup<'a, CTX, C::Key, C::Sharded>,
176176
) -> TryGetJob<'b, CTX, C>
177177
where
178-
K: DepKind,
179178
Q: QueryDescription<CTX, Key = C::Key, Value = C::Value, Cache = C>,
180-
CTX: QueryContext<DepKind = K>,
179+
CTX: QueryContext,
181180
{
182181
let lock = &mut *lookup.lock;
183182

@@ -391,7 +390,7 @@ where
391390
Q: QueryDescription<CTX>,
392391
CTX: QueryContext,
393392
{
394-
let job = match JobOwner::try_start::<Q, _>(tcx, span, &key, lookup) {
393+
let job = match JobOwner::try_start::<Q>(tcx, span, &key, lookup) {
395394
TryGetJob::NotYetStarted(job) => job,
396395
TryGetJob::Cycle(result) => return result,
397396
#[cfg(parallel_compiler)]
@@ -697,7 +696,7 @@ where
697696
// Cache hit, do nothing
698697
},
699698
|key, lookup| {
700-
let job = match JobOwner::try_start::<Q, _>(self, span, &key, lookup) {
699+
let job = match JobOwner::try_start::<Q>(self, span, &key, lookup) {
701700
TryGetJob::NotYetStarted(job) => job,
702701
TryGetJob::Cycle(_) => return,
703702
#[cfg(parallel_compiler)]

0 commit comments

Comments
 (0)