Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 039b3d0

Browse files
committed
Add make::ext::expr_self
Shortcut version of `make::expr_path(make::path_unqualified(make::path_segment_self()))`
1 parent 0e39257 commit 039b3d0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

crates/syntax/src/ast/make.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ pub mod ext {
6868
pub fn expr_ty_new(ty: &ast::Type) -> ast::Expr {
6969
expr_from_text(&format!("{ty}::new()"))
7070
}
71+
pub fn expr_self() -> ast::Expr {
72+
expr_from_text("self")
73+
}
7174

7275
pub fn zero_number() -> ast::Expr {
7376
expr_from_text("0")

0 commit comments

Comments
 (0)