fn process_cycles<P>(&mut self, processor: &mut P)
        where P: ObligationProcessor<Obligation=O>
    {
        let mut stack = self.scratch.take().unwrap();
        debug_assert!(stack.is_empty());

        debug!("process_cycles()");

        for index in 0..self.nodes.len() {
            // For rustc-benchmarks/inflate-0.1.0 this state test is extremely
            // hot and the state is almost always `Pending` or `Waiting`. It's
            // a win to handle the no-op cases immediately to avoid the cost of
            // the function call.
            let state = self.nodes[index].state.get();
            match state {
                NodeState::Waiting | NodeState::Pending | NodeState::Done | NodeState::Error => {},
                _ => self.find_cycles_from_node(&mut stack, processor, index),
            }
        }

        debug!("process_cycles: complete");

        debug_assert!(stack.is_empty());
        self.scratch = Some(stack);
    }
/// Mark all NodeState::Success nodes as NodeState::Done and
/// report all cycles between them. This should be called
/// after `mark_as_waiting` marks all nodes with pending
/// subobligations as NodeState::Waiting.
Mark all NodeState::Success nodes as NodeState::Done and
report all cycles between them. This should be called
after `mark_as_waiting` marks all nodes with pending
subobligations as NodeState::Waiting.
Mark all NodeState :: Success nodes as NodeState :: Done and report all cycles between them . This should be called after ` mark_as_waiting ` marks all nodes with pending subobligations as NodeState :: Waiting .
fn process_cycles<P>(&mut self, processor: &mut P)
        where P: ObligationProcessor<Obligation=O>
    {
        let mut stack = self.scratch.take().unwrap();
        debug_assert!(stack.is_empty());
        debug!("process_cycles()");
        for index in 0..self.nodes.len() {
            // For rustc-benchmarks/inflate-0.1.0 this state test is extremely
            // hot and the state is almost always `Pending` or `Waiting`. It's
            // a win to handle the no-op cases immediately to avoid the cost of
            // the function call.
            let state = self.nodes[index].state.get();
            match state {
                NodeState::Waiting | NodeState::Pending | NodeState::Done | NodeState::Error => {},
                _ => self.find_cycles_from_node(&mut stack, processor, index),
            }
        }
        debug!("process_cycles: complete");
        debug_assert!(stack.is_empty());
        self.scratch = Some(stack);
    }
fn process_cycles < P > ( & mut self , processor : & mut P ) where P : ObligationProcessor < Obligation = O > { let mut stack = self . scratch . take ( ) . unwrap ( ) ; debug_assert ! ( stack is_empty ( ) ) ; debug ! ( " " ) ; for index in 0 .. self . nodes . len ( ) { // For rustc-benchmarks/inflate-0.1.0 this state test is extremely // hot and the state is almost always `Pending` or `Waiting`. It's // a win to handle the no-op cases immediately to avoid the cost of // the function call. let state = self . nodes [ index ] . state . get ( ) ; match state { NodeState :: Waiting | NodeState :: Pending | NodeState :: Done | NodeState :: Error => { } , _ => self . find_cycles_from_node ( & mut stack , processor , index ) , } } debug ! ( " " ) ; debug_assert ! ( stack is_empty ( ) ) ; self . scratch = Some ( stack ) ; }
Mark all NodeState::Success nodes as NodeState::Done and
report all cycles between them.
Mark all NodeState :: Success nodes as NodeState :: Done and report all cycles between them .
&mut self
processor
&mut P
&mut self
processor
&mut P