From f9707cde6801f13cc4c20e3e08cee07ef23b8563 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 5 Jan 2021 15:45:46 +0300 Subject: Rename expr -> tail_expr --- crates/syntax/src/ast/generated/nodes.rs | 2 +- crates/syntax/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/syntax') diff --git a/crates/syntax/src/ast/generated/nodes.rs b/crates/syntax/src/ast/generated/nodes.rs index c5b80bffe..92ed2ee9d 100644 --- a/crates/syntax/src/ast/generated/nodes.rs +++ b/crates/syntax/src/ast/generated/nodes.rs @@ -484,7 +484,7 @@ impl ast::AttrsOwner for BlockExpr {} impl BlockExpr { pub fn l_curly_token(&self) -> Option { support::token(&self.syntax, T!['{']) } pub fn statements(&self) -> AstChildren { support::children(&self.syntax) } - pub fn expr(&self) -> Option { support::child(&self.syntax) } + pub fn tail_expr(&self) -> Option { support::child(&self.syntax) } pub fn r_curly_token(&self) -> Option { support::token(&self.syntax, T!['}']) } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] diff --git a/crates/syntax/src/lib.rs b/crates/syntax/src/lib.rs index da151e328..ea7482bb1 100644 --- a/crates/syntax/src/lib.rs +++ b/crates/syntax/src/lib.rs @@ -290,7 +290,7 @@ fn api_walkthrough() { // Let's get the `1 + 1` expression! let body: ast::BlockExpr = func.body().unwrap(); - let expr: ast::Expr = body.expr().unwrap(); + let expr: ast::Expr = body.tail_expr().unwrap(); // Enums are used to group related ast nodes together, and can be used for // matching. However, because there are no public fields, it's possible to -- cgit v1.2.3