aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVeetaha <[email protected]>2020-06-11 23:23:04 +0100
committerVeetaha <[email protected]>2020-06-11 23:23:04 +0100
commit33e009ec4258e058b966134cd251fd17b390d7f5 (patch)
tree4384105ab6b916dda8f0a16a4f9bde887e5ad7e1
parent36353bb1827dbd2efcde2d18c8598c4cc5e2e296 (diff)
Use more idiomatic style for lifetimes in generated code
-rw-r--r--xtask/src/codegen/gen_syntax.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs
index 19d5594f5..e66304c01 100644
--- a/xtask/src/codegen/gen_syntax.rs
+++ b/xtask/src/codegen/gen_syntax.rs
@@ -40,7 +40,7 @@ fn generate_tokens(grammar: AstSrc<'_>) -> Result<String> {
40 pub(crate) syntax: SyntaxToken, 40 pub(crate) syntax: SyntaxToken,
41 } 41 }
42 impl std::fmt::Display for #name { 42 impl std::fmt::Display for #name {
43 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 43 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
44 std::fmt::Display::fmt(&self.syntax, f) 44 std::fmt::Display::fmt(&self.syntax, f)
45 } 45 }
46 } 46 }
@@ -199,7 +199,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result<String> {
199 enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| { 199 enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| {
200 quote! { 200 quote! {
201 impl std::fmt::Display for #name { 201 impl std::fmt::Display for #name {
202 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { 202 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
203 std::fmt::Display::fmt(self.syntax(), f) 203 std::fmt::Display::fmt(self.syntax(), f)
204 } 204 }
205 } 205 }