summaryrefslogtreecommitdiff
path: root/src/syntax/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/ast.rs')
-rw-r--r--src/syntax/ast.rs2
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.