pub fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
        let mut attrs: Vec<ast::Attribute> = Vec::new();
        loop {
            debug!("parse_outer_attributes: self.token={:?}", self.token);
            match self.token {
                token::Pound => {
                    attrs.push(self.parse_attribute(false)?);
                }
                token::DocComment(s) => {
                    let attr = ::attr::mk_sugared_doc_attr(
                    attr::mk_attr_id(),
                    self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)),
                    self.span.lo,
                    self.span.hi
                );
                    if attr.node.style != ast::AttrStyle::Outer {
                        let mut err = self.fatal("expected outer doc comment");
                        err.note("inner doc comments like this (starting with \
                                  `//!` or `/*!`) can only appear before items");
                        return Err(err);
                    }
                    attrs.push(attr);
                    self.bump();
                }
                _ => break,
            }
        }
        return Ok(attrs);
    }
/// Parse attributes that appear before an item
Parse attributes that appear before an item
Parse attributes that appear before an item
pub fn parse_outer_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
        let mut attrs: Vec<ast::Attribute> = Vec::new();
        loop {
            debug!("parse_outer_attributes: self.token={:?}", self.token);
            match self.token {
                token::Pound => {
                    attrs.push(self.parse_attribute(false)?);
                }
                token::DocComment(s) => {
                    let attr = ::attr::mk_sugared_doc_attr(
                    attr::mk_attr_id(),
                    self.id_to_interned_str(ast::Ident::with_empty_ctxt(s)),
                    self.span.lo,
                    self.span.hi
                );
                    if attr.node.style != ast::AttrStyle::Outer {
                        let mut err = self.fatal("expected outer doc comment");
                        err.note("inner doc comments like this (starting with \
                                  `//!` or `/*!`) can only appear before items");
                        return Err(err);
                    }
                    attrs.push(attr);
                    self.bump();
                }
                _ => break,
            }
        }
        return Ok(attrs);
    }
pub fn parse_outer_attributes ( & mut self ) -> PResult < ' a , Vec < ast :: Attribute > > { let mut attrs : Vec < ast :: Attribute > = Vec :: new ( ) ; loop { debug ! ( " " self token ) ; match self . token { token :: Pound => { attrs . push ( self . parse_attribute ( false ) ? ) ; } token :: DocComment ( s ) => { let attr = :: attr :: mk_sugared_doc_attr ( attr :: mk_attr_id ( ) , self . id_to_interned_str ( ast :: Ident :: with_empty_ctxt ( s ) ) , self . span . lo , self . span . hi ) ; if attr . node . style != ast :: AttrStyle :: Outer { let mut err = self . fatal ( " " ) ; err . note ( " \
 " ) ; return Err ( err ) ; } attrs . push ( attr ) ; self . bump ( ) ; } _ => break , } } return Ok ( attrs ) ; }
Parse attributes that appear before an item
Parse attributes that appear before an item
&mut self
&mut self