From cb2ba997d89c38abd888e960708b62ea8fd940f0 Mon Sep 17 00:00:00 2001 From: matt rice Date: Sat, 8 Aug 2026 01:58:07 -0700 Subject: [PATCH] The referenced fn `complete_and_validate` is now private. When constructed through `ASTWithValidityInfo` ast's are read-only. --- cfgrammar/src/lib/yacc/ast.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cfgrammar/src/lib/yacc/ast.rs b/cfgrammar/src/lib/yacc/ast.rs index b860385c0..4d81b2b2d 100644 --- a/cfgrammar/src/lib/yacc/ast.rs +++ b/cfgrammar/src/lib/yacc/ast.rs @@ -142,9 +142,7 @@ impl FromStr for ASTWithValidityInfo { } } -/// An AST representing a grammar. This is built up gradually: when it is finished, the -/// `complete_and_validate` must be called exactly once in order to finish the set-up. At that -/// point, any further mutations made to the struct lead to undefined behaviour. +/// An AST representing a grammar. Typically these will only be constructed through [`ASTWithValidityInfo`] struct. #[derive(Debug, Clone)] #[cfg_attr(test, derive(PartialEq))] #[non_exhaustive]