pub fn parse_box_or_uniq_pointee(&mut self,
                                     sigil: ast::Sigil)
                                     -> Ty_ {
        // ~'foo fn() or ~fn() are parsed directly as obsolete fn types:
        match self.token {
            token::LIFETIME(..) => {
                let lifetime = self.parse_lifetime();
                self.obsolete(self.last_span, ObsoleteBoxedClosure);
                return self.parse_ty_closure(Some(sigil), Some(lifetime));
            }

            token::IDENT(..) => {
                if self.token_is_old_style_closure_keyword() {
                    self.obsolete(self.last_span, ObsoleteBoxedClosure);
                    return self.parse_ty_closure(Some(sigil), None);
                }
            }
            _ => {}
        }

        // other things are parsed as @/~ + a type.  Note that constructs like
        // @[] and @str will be resolved during typeck to slices and so forth,
        // rather than boxed ptrs.  But the special casing of str/vec is not
        // reflected in the AST type.
        if sigil == OwnedSigil {
            TyUniq(self.parse_ty(false))
        } else {
            TyBox(self.parse_ty(false))
        }
    }
// parse the type following a @ or a ~
parse the type following a @ or a ~
parse the type following a @ or a ~
pub fn parse_box_or_uniq_pointee(&mut self,
                                     sigil: ast::Sigil)
                                     -> Ty_ {
        // ~'foo fn() or ~fn() are parsed directly as obsolete fn types:
        match self.token {
            token::LIFETIME(..) => {
                let lifetime = self.parse_lifetime();
                self.obsolete(self.last_span, ObsoleteBoxedClosure);
                return self.parse_ty_closure(Some(sigil), Some(lifetime));
            }
            token::IDENT(..) => {
                if self.token_is_old_style_closure_keyword() {
                    self.obsolete(self.last_span, ObsoleteBoxedClosure);
                    return self.parse_ty_closure(Some(sigil), None);
                }
            }
            _ => {}
        }
        // other things are parsed as @/~ + a type.  Note that constructs like
        // @[] and @str will be resolved during typeck to slices and so forth,
        // rather than boxed ptrs.  But the special casing of str/vec is not
        // reflected in the AST type.
        if sigil == OwnedSigil {
            TyUniq(self.parse_ty(false))
        } else {
            TyBox(self.parse_ty(false))
        }
    }
pub fn parse_box_or_uniq_pointee ( & mut self , sigil : ast :: Sigil ) -> Ty_ { // ~'foo fn() or ~fn() are parsed directly as obsolete fn types: match self . token { token :: LIFETIME ( .. ) => { let lifetime = self . parse_lifetime ( ) ; self . obsolete ( self . last_span , ObsoleteBoxedClosure ) ; return self . parse_ty_closure ( Some ( sigil ) , Some ( lifetime ) ) ; } token :: IDENT ( .. ) => { if self . token_is_old_style_closure_keyword ( ) { self . obsolete ( self . last_span , ObsoleteBoxedClosure ) ; return self . parse_ty_closure ( Some ( sigil ) , None ) ; } } _ => { } } // other things are parsed as @/~ + a type.  Note that constructs like // @[] and @str will be resolved during typeck to slices and so forth, // rather than boxed ptrs.  But the special casing of str/vec is not // reflected in the AST type. if sigil == OwnedSigil { TyUniq ( self . parse_ty ( false ) ) } else { TyBox ( self . parse_ty ( false ) ) } }
parse the type following a @ or a ~
parse the type following a @ or a ~
&mut self
sigil
ast::Sigil
&mut self
sigil
ast::Sigil