pub(super) fn await<'lcx>(
        &self,
        tcx: TyCtxt<'_, 'tcx, 'lcx>,
        span: Span,
    ) -> Result<(), CycleError<'tcx>> {
        #[cfg(not(parallel_queries))]
        {
            self.find_cycle_in_stack(tcx, span)
        }

        #[cfg(parallel_queries)]
        {
            tls::with_related_context(tcx, move |icx| {
                let mut waiter = Lrc::new(QueryWaiter {
                    query: icx.query.clone(),
                    span,
                    cycle: Lock::new(None),
                    condvar: Condvar::new(),
                });
                self.latch.await(&waiter);

                match Lrc::get_mut(&mut waiter).unwrap().cycle.get_mut().take() {
                    None => Ok(()),
                    Some(cycle) => Err(cycle)
                }
            })
        }
    }
/// Awaits for the query job to complete.
///
/// For single threaded rustc there's no concurrent jobs running, so if we are waiting for any
/// query that means that there is a query cycle, thus this always running a cycle error.
Awaits for the query job to complete.
For single threaded rustc there's no concurrent jobs running, so if we are waiting for any
query that means that there is a query cycle, thus this always running a cycle error.
Awaits for the query job to complete . For single threaded rustc there ' s no concurrent jobs running so if we are waiting for any query that means that there is a query cycle thus this always running a cycle error .
pub(super) fn await<'lcx>(
        &self,
        tcx: TyCtxt<'_, 'tcx, 'lcx>,
        span: Span,
    ) -> Result<(), CycleError<'tcx>> {
        #[cfg(not(parallel_queries))]
        {
            self.find_cycle_in_stack(tcx, span)
        }
        #[cfg(parallel_queries)]
        {
            tls::with_related_context(tcx, move |icx| {
                let mut waiter = Lrc::new(QueryWaiter {
                    query: icx.query.clone(),
                    span,
                    cycle: Lock::new(None),
                    condvar: Condvar::new(),
                });
                self.latch.await(&waiter);
                match Lrc::get_mut(&mut waiter).unwrap().cycle.get_mut().take() {
                    None => Ok(()),
                    Some(cycle) => Err(cycle)
                }
            })
        }
    }
pub ( super ) fn await < ' lcx > ( & self , tcx : TyCtxt < ' _ , ' tcx , ' lcx > , span : Span , ) -> Result < ( ) , CycleError < ' tcx > > { # [ cfg ( not ( parallel_queries ) ) ] { self . find_cycle_in_stack ( tcx , span ) } # [ cfg ( parallel_queries ) ] { tls :: with_related_context ( tcx , move | icx | { let mut waiter = Lrc :: new ( QueryWaiter { query : icx . query . clone ( ) , span , cycle : Lock :: new ( None ) , condvar : Condvar :: new ( ) , } ) ; self . latch . await ( & waiter ) ; match Lrc :: get_mut ( & mut waiter ) . unwrap ( ) . cycle . get_mut ( ) . take ( ) { None => Ok ( ( ) ) , Some ( cycle ) => Err ( cycle ) } } ) } }
Awaits for the query job to complete.
Awaits for the query job to complete .
&self
tcx
TyCtxt<'_, 'tcx, 'lcx>
span
Span