Rename await into cycle_error for the single threaded case and add some comments
This commit is contained in:
parent
8e53ecff6c
commit
9d888eadc5
@ -91,7 +91,7 @@ pub fn new(info: QueryInfo<'tcx>, parent: Option<Lrc<QueryJob<'tcx>>>) -> Self {
|
||||
#[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 @@ pub(super) fn try_get(
|
||||
};
|
||||
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…
Reference in New Issue
Block a user