fn error_at(&mut self, p: usize) -> Vec<O> {
        let mut error_stack = self.scratch.take().unwrap();
        let mut trace = vec![];

        let mut n = p;
        loop {
            self.nodes[n].state.set(NodeState::Error);
            trace.push(self.nodes[n].obligation.clone());
            error_stack.extend(self.nodes[n].dependents.iter().map(|x| x.get()));

            // loop to the parent
            match self.nodes[n].parent {
                Some(q) => n = q.get(),
                None => break
            }
        }

        while let Some(i) = error_stack.pop() {
            let node = &self.nodes[i];

            match node.state.get() {
                NodeState::Error => continue,
                _ => node.state.set(NodeState::Error)
            }

            error_stack.extend(
                node.parent.iter().chain(node.dependents.iter()).map(|x| x.get())
            );
        }

        self.scratch = Some(error_stack);
        trace
    }
/// Returns a vector of obligations for `p` and all of its
/// ancestors, putting them into the error state in the process.
Returns a vector of obligations for `p` and all of its
ancestors, putting them into the error state in the process.
Returns a vector of obligations for ` p ` and all of its ancestors putting them into the error state in the process .
fn error_at(&mut self, p: usize) -> Vec<O> {
        let mut error_stack = self.scratch.take().unwrap();
        let mut trace = vec![];
        let mut n = p;
        loop {
            self.nodes[n].state.set(NodeState::Error);
            trace.push(self.nodes[n].obligation.clone());
            error_stack.extend(self.nodes[n].dependents.iter().map(|x| x.get()));
            // loop to the parent
            match self.nodes[n].parent {
                Some(q) => n = q.get(),
                None => break
            }
        }
        while let Some(i) = error_stack.pop() {
            let node = &self.nodes[i];
            match node.state.get() {
                NodeState::Error => continue,
                _ => node.state.set(NodeState::Error)
            }
            error_stack.extend(
                node.parent.iter().chain(node.dependents.iter()).map(|x| x.get())
            );
        }
        self.scratch = Some(error_stack);
        trace
    }
fn error_at ( & mut self , p : usize ) -> Vec < O > { let mut error_stack = self . scratch . take ( ) . unwrap ( ) ; let mut trace = vec ! [ ] ; let mut n = p ; loop { self . nodes [ n ] . state . set ( NodeState :: Error ) ; trace . push ( self . nodes [ n ] . obligation . clone ( ) ) ; error_stack . extend ( self . nodes [ n ] . dependents . iter ( ) . map ( | x | x . get ( ) ) ) ; // loop to the parent match self . nodes [ n ] . parent { Some ( q ) => n = q . get ( ) , None => break } } while let Some ( i ) = error_stack . pop ( ) { let node = & self . nodes [ i ] ; match node . state . get ( ) { NodeState :: Error => continue , _ => node . state . set ( NodeState :: Error ) } error_stack . extend ( node . parent . iter ( ) . chain ( node . dependents . iter ( ) ) . map ( | x | x . get ( ) ) ) ; } self . scratch = Some ( error_stack ) ; trace }
Returns a vector of obligations for `p` and all of its
ancestors, putting them into the error state in the process.
Returns a vector of obligations for ` p ` and all of its ancestors putting them into the error state in the process .
&mut self
p
usize
&mut self
p
usize