From 68c6160a14be4e77b98cd704d9e641a03aefa332 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Fri, 30 Dec 2022 09:48:30 +0100 Subject: Recursion with max depth --- src/syntax/ast.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/syntax') diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs index d2b19ee3..6483f7cc 100644 --- a/src/syntax/ast.rs +++ b/src/syntax/ast.rs @@ -1277,7 +1277,7 @@ impl Closure { /// /// This only exists if you use the function syntax sugar: `let f(x) = y`. pub fn name(&self) -> Option { - self.0.cast_first_child() + self.0.children().next()?.cast() } /// The parameter bindings. -- cgit v1.2.3