aboutsummaryrefslogtreecommitdiff
path: root/xtask/src
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src')
-rw-r--r--xtask/src/codegen/gen_syntax.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index db05dcebb..879f0243e 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -68,6 +68,12 @@ fn generate_ast(grammar: AstSrc<'_>) -> Result<String> {
68 pub(crate) syntax: SyntaxNode, 68 pub(crate) syntax: SyntaxNode,
69 } 69 }
70 70
71 impl std::fmt::Display for #name {
72 fn fmt(..) -> std::fmt::Result {
73 std::fmt::Display::fmt(self.syntax())
74 }
75 }
76
71 impl AstNode for #name { 77 impl AstNode for #name {
72 fn can_cast(kind: SyntaxKind) -> bool { 78 fn can_cast(kind: SyntaxKind) -> bool {
73 match kind { 79 match kind {