X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_parse%2Fsrc%2Fparser%2Fitem.rs;h=56757c1d903518780c5d0f7ccee9994912f54c8f;hb=7907385999b4a83d37ed31d334f3ed9ca02983a1;hp=10f1daf11295107540cd1d6d180741c3db06c49d;hpb=a707f401074bc769bab4efb2bfdde7f6c5a4068d;p=rust.git diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 10f1daf1129..56757c1d903 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -485,7 +485,7 @@ fn parse_polarity(&mut self) -> ast::ImplPolarity { /// Parses an implementation item. /// - /// ``` + /// ```ignore (illustrative) /// impl<'a, T> TYPE { /* impl items */ } /// impl<'a, T> TRAIT for TYPE { /* impl items */ } /// impl<'a, T> !TRAIT for TYPE { /* impl items */ } @@ -493,7 +493,7 @@ fn parse_polarity(&mut self) -> ast::ImplPolarity { /// ``` /// /// We actually parse slightly more relaxed grammar for better error reporting and recovery. - /// ``` + /// ```ebnf /// "impl" GENERICS "const"? "!"? TYPE "for"? (TYPE | "..") ("where" PREDICATES)? "{" BODY "}" /// "impl" GENERICS "const"? "!"? TYPE ("where" PREDICATES)? "{" BODY "}" /// ``` @@ -806,7 +806,7 @@ fn parse_assoc_item( } /// Parses a `type` alias with the following grammar: - /// ``` + /// ```ebnf /// TypeAlias = "type" Ident Generics {":" GenericBounds}? {"=" Ty}? ";" ; /// ``` /// The `"type"` has already been eaten. @@ -930,7 +930,7 @@ fn parse_ident_or_underscore(&mut self) -> PResult<'a, Ident> { /// /// # Examples /// - /// ``` + /// ```ignore (illustrative) /// extern crate foo; /// extern crate bar as foo; /// ``` @@ -1630,7 +1630,7 @@ fn parse_field_ident(&mut self, adt_ty: &str, lo: Span) -> PResult<'a, Ident> { /// Parses a declarative macro 2.0 definition. /// The `macro` keyword has already been parsed. - /// ``` + /// ```ebnf /// MacBody = "{" TOKEN_STREAM "}" ; /// MacParams = "(" TOKEN_STREAM ")" ; /// DeclMac = "macro" Ident MacParams? MacBody ;