aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-06-12 13:49:30 +0100
committerGitHub <[email protected]>2020-06-12 13:49:30 +0100
commitf3d73865d6ce6989018b3ebee8e199853253bfd7 (patch)
treea08275bbaa5d4b56b05ba01cd18429f1acb0857e /xtask/src/codegen
parent1906655070f943f70d21fdbe54227d9b4521096b (diff)
parentc514060600ac6787da4bcfa0bbd8b74bb4cf7d18 (diff)
Merge #4855
4855: Use more idiomatic style for lifetimes in generated code r=matklad a=Veetaha Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'xtask/src/codegen')
-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 f8b34638b..745a25862 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 }