Add make::ext::expr_self

Shortcut version of `make::expr_path(make::path_unqualified(make::path_segment_self()))`
This commit is contained in:
DropDemBits
2023-12-14 18:45:20 -05:00
parent 0e39257e5b
commit 039b3d0abb
+3
View File
@@ -68,6 +68,9 @@ pub fn expr_ty_default(ty: &ast::Type) -> ast::Expr {
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")