Simplify generics on try_start.
This commit is contained in:
parent
fa06cfd25b
commit
5dfed41812
1 changed files with 4 additions and 5 deletions
|
@ -168,16 +168,15 @@ where
|
||||||
/// This function is inlined because that results in a noticeable speed-up
|
/// This function is inlined because that results in a noticeable speed-up
|
||||||
/// for some compile-time benchmarks.
|
/// for some compile-time benchmarks.
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn try_start<'a, 'b, Q, K>(
|
fn try_start<'a, 'b, Q>(
|
||||||
tcx: CTX,
|
tcx: CTX,
|
||||||
span: Span,
|
span: Span,
|
||||||
key: &C::Key,
|
key: &C::Key,
|
||||||
mut lookup: QueryLookup<'a, CTX, C::Key, C::Sharded>,
|
mut lookup: QueryLookup<'a, CTX, C::Key, C::Sharded>,
|
||||||
) -> TryGetJob<'b, CTX, C>
|
) -> TryGetJob<'b, CTX, C>
|
||||||
where
|
where
|
||||||
K: DepKind,
|
|
||||||
Q: QueryDescription<CTX, Key = C::Key, Value = C::Value, Cache = C>,
|
Q: QueryDescription<CTX, Key = C::Key, Value = C::Value, Cache = C>,
|
||||||
CTX: QueryContext<DepKind = K>,
|
CTX: QueryContext,
|
||||||
{
|
{
|
||||||
let lock = &mut *lookup.lock;
|
let lock = &mut *lookup.lock;
|
||||||
|
|
||||||
|
@ -391,7 +390,7 @@ where
|
||||||
Q: QueryDescription<CTX>,
|
Q: QueryDescription<CTX>,
|
||||||
CTX: QueryContext,
|
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::NotYetStarted(job) => job,
|
||||||
TryGetJob::Cycle(result) => return result,
|
TryGetJob::Cycle(result) => return result,
|
||||||
#[cfg(parallel_compiler)]
|
#[cfg(parallel_compiler)]
|
||||||
|
@ -697,7 +696,7 @@ where
|
||||||
// Cache hit, do nothing
|
// Cache hit, do nothing
|
||||||
},
|
},
|
||||||
|key, lookup| {
|
|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::NotYetStarted(job) => job,
|
||||||
TryGetJob::Cycle(_) => return,
|
TryGetJob::Cycle(_) => return,
|
||||||
#[cfg(parallel_compiler)]
|
#[cfg(parallel_compiler)]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue