mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03:00
Add make::ext::expr_self
Shortcut version of `make::expr_path(make::path_unqualified(make::path_segment_self()))`
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user