pub fn poll(&self) -> Result<&'t T> {
        match *self.0.borrow() {
            SlotState::ReadyOk(x) => return Ok(x),
            SlotState::ReadyErr => return Err(()),
            SlotState::Transient => panic!("slot recursion"),
            _ => (),
        }
        let (ast, context) = match self.0.replace(SlotState::Transient) {
            SlotState::Fresh(ast, context) => (ast, context),
            _ => unreachable!(),
        };
        let node = T::from_ast(ast, context.clone()).map(|x| context.alloc(x) as &T);
        self.0.replace(match node {
            Ok(x) => SlotState::ReadyOk(x),
            Err(()) => SlotState::ReadyErr,
        });
        node
    }
/// Poll the slot, creating the HIR node from the AST the first time.
Poll the slot, creating the HIR node from the AST the first time.
Poll the slot creating the HIR node from the AST the first time .
pub fn poll(&self) -> Result<&'t T> {
        match *self.0.borrow() {
            SlotState::ReadyOk(x) => return Ok(x),
            SlotState::ReadyErr => return Err(()),
            SlotState::Transient => panic!("slot recursion"),
            _ => (),
        }
        let (ast, context) = match self.0.replace(SlotState::Transient) {
            SlotState::Fresh(ast, context) => (ast, context),
            _ => unreachable!(),
        };
        let node = T::from_ast(ast, context.clone()).map(|x| context.alloc(x) as &T);
        self.0.replace(match node {
            Ok(x) => SlotState::ReadyOk(x),
            Err(()) => SlotState::ReadyErr,
        });
        node
    }
pub fn poll ( & self ) -> Result < & ' t T > { match * self . 0 . borrow ( ) { SlotState :: ReadyOk ( x ) => return Ok ( x ) , SlotState :: ReadyErr => return Err ( ( ) ) , SlotState :: Transient => panic ! ( " " ) , _ => ( ) , } let ( ast , context ) = match self . 0 . replace ( SlotState :: Transient ) { SlotState :: Fresh ( ast , context ) => ( ast , context ) , _ => unreachable ! ( ) , } ; let node = T :: from_ast ( ast , context . clone ( ) ) . map ( | x | context . alloc ( x ) as & T ) ; self . 0 . replace ( match node { Ok ( x ) => SlotState :: ReadyOk ( x ) , Err ( ( ) ) => SlotState :: ReadyErr , } ) ; node }
Poll the slot, creating the HIR node from the AST the first time.
Poll the slot creating the HIR node from the AST the first time .
&self
&self