crate fn parse_inner_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
        let mut attrs: Vec<ast::Attribute> = vec![];
        loop {
            match self.token.kind {
                token::Pound => {
                    // Don't even try to parse if it's not an inner attribute.
                    if !self.look_ahead(1, |t| t == &token::Not) {
                        break;
                    }

                    let attr = self.parse_attribute(true)?;
                    assert_eq!(attr.style, ast::AttrStyle::Inner);
                    attrs.push(attr);
                }
                token::DocComment(s) => {
                    // We need to get the position of this token before we bump.
                    let attr = self.mk_doc_comment(s);
                    if attr.style == ast::AttrStyle::Inner {
                        attrs.push(attr);
                        self.bump();
                    } else {
                        break;
                    }
                }
                _ => break,
            }
        }
        Ok(attrs)
    }
/// Parses attributes that appear after the opening of an item. These should
/// be preceded by an exclamation mark, but we accept and warn about one
/// terminated by a semicolon.
///
/// Matches `inner_attrs*`.
Parses attributes that appear after the opening of an item. These should
be preceded by an exclamation mark, but we accept and warn about one
terminated by a semicolon.


Parses attributes that appear after the opening of an item . These should be preceded by an exclamation mark but we accept and warn about one terminated by a semicolon .
crate fn parse_inner_attributes(&mut self) -> PResult<'a, Vec<ast::Attribute>> {
        let mut attrs: Vec<ast::Attribute> = vec![];
        loop {
            match self.token.kind {
                token::Pound => {
                    // Don't even try to parse if it's not an inner attribute.
                    if !self.look_ahead(1, |t| t == &token::Not) {
                        break;
                    }
                    let attr = self.parse_attribute(true)?;
                    assert_eq!(attr.style, ast::AttrStyle::Inner);
                    attrs.push(attr);
                }
                token::DocComment(s) => {
                    // We need to get the position of this token before we bump.
                    let attr = self.mk_doc_comment(s);
                    if attr.style == ast::AttrStyle::Inner {
                        attrs.push(attr);
                        self.bump();
                    } else {
                        break;
                    }
                }
                _ => break,
            }
        }
        Ok(attrs)
    }
crate fn parse_inner_attributes ( & mut self ) -> PResult < ' a , Vec < ast :: Attribute > > { let mut attrs : Vec < ast :: Attribute > = vec ! [ ] ; loop { match self . token . kind { token :: Pound => { // Don't even try to parse if it's not an inner attribute. if ! self . look_ahead ( 1 , | t | t == & token :: Not ) { break ; } let attr = self . parse_attribute ( true ) ? ; assert_eq ! ( attr style ast AttrStyle Inner ) ; attrs . push ( attr ) ; } token :: DocComment ( s ) => { // We need to get the position of this token before we bump. let attr = self . mk_doc_comment ( s ) ; if attr . style == ast :: AttrStyle :: Inner { attrs . push ( attr ) ; self . bump ( ) ; } else { break ; } } _ => break , } } Ok ( attrs ) }
Parses attributes that appear after the opening of an item.
Parses attributes that appear after the opening of an item .
&mut self