From 33e009ec4258e058b966134cd251fd17b390d7f5 Mon Sep 17 00:00:00 2001 From: Veetaha Date: Fri, 12 Jun 2020 01:23:04 +0300 Subject: [PATCH] Use more idiomatic style for lifetimes in generated code --- xtask/src/codegen/gen_syntax.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xtask/src/codegen/gen_syntax.rs b/xtask/src/codegen/gen_syntax.rs index 19d5594f5b..e66304c01e 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 { pub(crate) syntax: SyntaxToken, } impl std::fmt::Display for #name { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Display::fmt(&self.syntax, f) } } @@ -199,7 +199,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result { enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| { quote! { impl std::fmt::Display for #name { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { std::fmt::Display::fmt(self.syntax(), f) } }