]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_parse/src/parser/attr.rs
fix most compiler/ doctests
[rust.git] / compiler / rustc_parse / src / parser / attr.rs
index 358b01df3b983523d00191c26fe7469ec4970881..2f90a7c54aba6f4454aa182075d2d3b6dcf305f1 100644 (file)
@@ -371,9 +371,10 @@ pub fn parse_cfg_attr(&mut self) -> PResult<'a, (ast::MetaItem, Vec<(ast::AttrIt
     }
 
     /// Matches the following grammar (per RFC 1559).
-    ///
-    ///     meta_item : PATH ( '=' UNSUFFIXED_LIT | '(' meta_item_inner? ')' )? ;
-    ///     meta_item_inner : (meta_item | UNSUFFIXED_LIT) (',' meta_item_inner)? ;
+    /// ```ebnf
+    /// meta_item : PATH ( '=' UNSUFFIXED_LIT | '(' meta_item_inner? ')' )? ;
+    /// meta_item_inner : (meta_item | UNSUFFIXED_LIT) (',' meta_item_inner)? ;
+    /// ```
     pub fn parse_meta_item(&mut self) -> PResult<'a, ast::MetaItem> {
         let nt_meta = match self.token.kind {
             token::Interpolated(ref nt) => match **nt {