aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-01-10 10:23:11 +0000
committerAleksey Kladov <[email protected]>2020-01-10 10:23:43 +0000
commitfd394ff424a8abde35f24643dfabbd5bd3f2f43c (patch)
tree23071b83610a2d0b61ffcb606f83c3e95a2809bd /xtask/src/codegen
parentb77a7e29a5b345a5dcdf427a0b332630147bcd5b (diff)
Use correct rustfmt for codegen
closes #1569
Diffstat (limited to 'xtask/src/codegen')
-rw-r--r--xtask/src/codegen/gen_assists_docs.rs2
-rw-r--r--xtask/src/codegen/gen_syntax.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/xtask/src/codegen/gen_assists_docs.rs b/xtask/src/codegen/gen_assists_docs.rs
index 05afda8f1..69f9b4872 100644
--- a/xtask/src/codegen/gen_assists_docs.rs
+++ b/xtask/src/codegen/gen_assists_docs.rs
@@ -102,7 +102,7 @@ r#####"
102 102
103 buf.push_str(&test) 103 buf.push_str(&test)
104 } 104 }
105 let buf = codegen::reformat(buf)?; 105 let buf = crate::reformat(buf)?;
106 codegen::update(&project_root().join(codegen::ASSISTS_TESTS), &buf, mode) 106 codegen::update(&project_root().join(codegen::ASSISTS_TESTS), &buf, mode)
107} 107}
108 108
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 0f50ca569..19fea67d8 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -152,7 +152,7 @@ fn generate_ast(grammar: AstSrc<'_>) -> Result<String> {
152 #(#enums)* 152 #(#enums)*
153 }; 153 };
154 154
155 let pretty = codegen::reformat(ast)?; 155 let pretty = crate::reformat(ast)?;
156 Ok(pretty) 156 Ok(pretty)
157} 157}
158 158
@@ -265,7 +265,7 @@ fn generate_syntax_kinds(grammar: KindsSrc<'_>) -> Result<String> {
265 } 265 }
266 }; 266 };
267 267
268 codegen::reformat(ast) 268 crate::reformat(ast)
269} 269}
270 270
271fn to_upper_snake_case(s: &str) -> String { 271fn to_upper_snake_case(s: &str) -> String {