Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/codegen/grammar/ast_src.rs')
-rw-r--r--xtask/src/codegen/grammar/ast_src.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/codegen/grammar/ast_src.rs b/xtask/src/codegen/grammar/ast_src.rs
index 205072a6ce..564d9cc24e 100644
--- a/xtask/src/codegen/grammar/ast_src.rs
+++ b/xtask/src/codegen/grammar/ast_src.rs
@@ -189,9 +189,9 @@ pub(crate) fn generate_kind_src(
}
}
});
- PUNCT.iter().zip(used_puncts).filter(|(_, used)| !used).for_each(|((punct, _), _)| {
+ if let Some(punct) = PUNCT.iter().zip(used_puncts).find(|(_, used)| !used) {
panic!("Punctuation {punct:?} is not used in grammar");
- });
+ }
keywords.extend(RESERVED.iter().copied());
keywords.sort();
keywords.dedup();