Skip to content

Commit 33e009e

Browse files
committed
Use more idiomatic style for lifetimes in generated code
1 parent 36353bb commit 33e009e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xtask/src/codegen/gen_syntax.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn generate_tokens(grammar: AstSrc<'_>) -> Result<String> {
4040
pub(crate) syntax: SyntaxToken,
4141
}
4242
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 {
4444
std::fmt::Display::fmt(&self.syntax, f)
4545
}
4646
}
@@ -199,7 +199,7 @@ fn generate_nodes(kinds: KindsSrc<'_>, grammar: AstSrc<'_>) -> Result<String> {
199199
enum_names.chain(node_names.clone()).map(|it| format_ident!("{}", it)).map(|name| {
200200
quote! {
201201
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 {
203203
std::fmt::Display::fmt(self.syntax(), f)
204204
}
205205
}

0 commit comments

Comments
 (0)