Unnamed repository; edit this file 'description' to name the repository.
-rw-r--r--crates/syntax/src/ast/make.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs
index 764221fc8b..b6e5e6a4e4 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -68,6 +68,9 @@ pub mod ext {
pub fn expr_ty_new(ty: &ast::Type) -> ast::Expr {
expr_from_text(&format!("{ty}::new()"))
}
+ pub fn expr_self() -> ast::Expr {
+ expr_from_text("self")
+ }
pub fn zero_number() -> ast::Expr {
expr_from_text("0")