diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-30 09:48:30 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-30 09:48:30 +0100 |
| commit | 68c6160a14be4e77b98cd704d9e641a03aefa332 (patch) | |
| tree | 3eb0d02bf16e62cf43b7e5426126934b4ce7fbf2 /src/syntax | |
| parent | a12bc3a797c1a29ef223c9e8be6c52cc4e748a02 (diff) | |
Recursion with max depth
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/ast.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<Ident> { - self.0.cast_first_child() + self.0.children().next()?.cast() } /// The parameter bindings. |
