From 9cccac5910cb2fa870616d8c13d5a79a6386436a Mon Sep 17 00:00:00 2001 From: John Date: Mon, 20 Oct 2025 04:52:52 -0400 Subject: [PATCH] docs: Fix cargo-doc errors --- src/ast.rs | 8 ++++---- src/parser.rs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ast.rs b/src/ast.rs index 5d4d2b6..695a05e 100644 --- a/src/ast.rs +++ b/src/ast.rs @@ -130,7 +130,7 @@ pub enum BindKind { pub struct Make(pub Anno, A>, pub Vec>); /// A single "arm" of a make expression -/// ```ignore +/// ```text /// Identifier (':' Expr)? /// ``` #[derive(Clone, Debug, PartialEq, Eq)] @@ -157,10 +157,10 @@ pub enum Expr { MetId(String), /// A literal bool, string, char, or int Lit(Literal), - /// `(let | const | static) Pat (= expr (else expr)?)?` | - /// `(fn | mod | impl) Pat Expr` + /// `(let | const | static) Pat::NoTopAlt (= expr (else expr)?)?` | + /// `(fn | mod | impl) Pat::Fn Expr` Bind(Box>), - /// (struct | enum | type) Pat + /// (struct | enum | type) Pat::NoTopAlt Struct(Box), /// Expr { (Ident (: Expr)?),* } Make(Box>), diff --git a/src/parser.rs b/src/parser.rs index 27d124c..936b8d8 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -164,7 +164,7 @@ impl<'t> Parser<'t> { /// Parses a list of P separated by `sep` tokens, ending in an `end` token. /// ```ignore - /// List = (T `sep`)* T? `end` ; + /// List = (T sep)* T? end ; /// ``` pub fn list>( &mut self, @@ -188,7 +188,7 @@ impl<'t> Parser<'t> { /// Parses a list of one or more P at level `level`, separated by `sep` tokens /// ```ignore - /// UnterminatedList

= P (`sep` P)* + /// UnterminatedList

= P (sep P)* /// ``` pub fn list_bare>( &mut self,