Remove unused tcx parameter
This commit is contained in:
parent
1275cc15d6
commit
bff104d4db
@ -43,9 +43,8 @@ fn lookup<CTX: QueryContext, R, OnHit, OnMiss>(
|
|||||||
OnHit: FnOnce(&Self::Stored, DepNodeIndex) -> R,
|
OnHit: FnOnce(&Self::Stored, DepNodeIndex) -> R,
|
||||||
OnMiss: FnOnce(Self::Key, QueryLookup<'_, CTX, Self::Key, Self::Sharded>) -> R;
|
OnMiss: FnOnce(Self::Key, QueryLookup<'_, CTX, Self::Key, Self::Sharded>) -> R;
|
||||||
|
|
||||||
fn complete<CTX: QueryContext>(
|
fn complete(
|
||||||
&self,
|
&self,
|
||||||
tcx: CTX,
|
|
||||||
lock_sharded_storage: &mut Self::Sharded,
|
lock_sharded_storage: &mut Self::Sharded,
|
||||||
key: Self::Key,
|
key: Self::Key,
|
||||||
value: Self::Value,
|
value: Self::Value,
|
||||||
@ -112,9 +111,8 @@ fn lookup<CTX: QueryContext, R, OnHit, OnMiss>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn complete<CTX: QueryContext>(
|
fn complete(
|
||||||
&self,
|
&self,
|
||||||
_: CTX,
|
|
||||||
lock_sharded_storage: &mut Self::Sharded,
|
lock_sharded_storage: &mut Self::Sharded,
|
||||||
key: K,
|
key: K,
|
||||||
value: V,
|
value: V,
|
||||||
@ -195,9 +193,8 @@ fn lookup<CTX: QueryContext, R, OnHit, OnMiss>(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline]
|
#[inline]
|
||||||
fn complete<CTX: QueryContext>(
|
fn complete(
|
||||||
&self,
|
&self,
|
||||||
_: CTX,
|
|
||||||
lock_sharded_storage: &mut Self::Sharded,
|
lock_sharded_storage: &mut Self::Sharded,
|
||||||
key: K,
|
key: K,
|
||||||
value: V,
|
value: V,
|
||||||
|
@ -264,7 +264,7 @@ fn try_start<'a, 'b>(
|
|||||||
/// Completes the query by updating the query cache with the `result`,
|
/// Completes the query by updating the query cache with the `result`,
|
||||||
/// signals the waiter and forgets the JobOwner, so it won't poison the query
|
/// signals the waiter and forgets the JobOwner, so it won't poison the query
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
fn complete(self, tcx: CTX, result: C::Value, dep_node_index: DepNodeIndex) -> C::Stored {
|
fn complete(self, result: C::Value, dep_node_index: DepNodeIndex) -> C::Stored {
|
||||||
// We can move out of `self` here because we `mem::forget` it below
|
// We can move out of `self` here because we `mem::forget` it below
|
||||||
let key = unsafe { ptr::read(&self.key) };
|
let key = unsafe { ptr::read(&self.key) };
|
||||||
let state = self.state;
|
let state = self.state;
|
||||||
@ -278,7 +278,7 @@ fn complete(self, tcx: CTX, result: C::Value, dep_node_index: DepNodeIndex) -> C
|
|||||||
QueryResult::Started(job) => job,
|
QueryResult::Started(job) => job,
|
||||||
QueryResult::Poisoned => panic!(),
|
QueryResult::Poisoned => panic!(),
|
||||||
};
|
};
|
||||||
let result = state.cache.complete(tcx, &mut lock.cache, key, result, dep_node_index);
|
let result = state.cache.complete(&mut lock.cache, key, result, dep_node_index);
|
||||||
(job, result)
|
(job, result)
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ fn try_execute_query<CTX, C>(
|
|||||||
tcx.store_diagnostics_for_anon_node(dep_node_index, diagnostics);
|
tcx.store_diagnostics_for_anon_node(dep_node_index, diagnostics);
|
||||||
}
|
}
|
||||||
|
|
||||||
return job.complete(tcx, result, dep_node_index);
|
return job.complete(result, dep_node_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
let dep_node = query.to_dep_node(tcx, &key);
|
let dep_node = query.to_dep_node(tcx, &key);
|
||||||
@ -458,7 +458,7 @@ fn try_execute_query<CTX, C>(
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
if let Some((result, dep_node_index)) = loaded {
|
if let Some((result, dep_node_index)) = loaded {
|
||||||
return job.complete(tcx, result, dep_node_index);
|
return job.complete(result, dep_node_index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -609,7 +609,7 @@ fn force_query_with_job<C, CTX>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = job.complete(tcx, result, dep_node_index);
|
let result = job.complete(result, dep_node_index);
|
||||||
|
|
||||||
(result, dep_node_index)
|
(result, dep_node_index)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user