Rename await into cycle_error for the single threaded case and add some comments
This commit is contained in:
parent
8e53ecff6c
commit
9d888eadc5
2 changed files with 6 additions and 2 deletions
|
|
@ -91,7 +91,7 @@ impl<'tcx> QueryJob<'tcx> {
|
|||
#[cfg(not(parallel_queries))]
|
||||
#[inline(never)]
|
||||
#[cold]
|
||||
pub(super) fn await<'lcx, 'a, D: QueryDescription<'tcx>>(
|
||||
pub(super) fn cycle_error<'lcx, 'a, D: QueryDescription<'tcx>>(
|
||||
&self,
|
||||
tcx: TyCtxt<'_, 'tcx, 'lcx>,
|
||||
span: Span,
|
||||
|
|
|
|||
|
|
@ -153,9 +153,13 @@ impl<'a, 'tcx, Q: QueryDescription<'tcx>> JobOwner<'a, 'tcx, Q> {
|
|||
};
|
||||
mem::drop(lock);
|
||||
|
||||
// If we are single-threaded we know that we have cycle error,
|
||||
// so we just turn the errror
|
||||
#[cfg(not(parallel_queries))]
|
||||
return job.await(tcx, span);
|
||||
return job.cycle_error(tcx, span);
|
||||
|
||||
// With parallel queries we might just have to wait on some other
|
||||
// thread
|
||||
#[cfg(parallel_queries)]
|
||||
{
|
||||
if let Err(cycle) = job.await(tcx, span) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue