mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Add make::ext::expr_self
Shortcut version of `make::expr_path(make::path_unqualified(make::path_segment_self()))`
This commit is contained in:
parent
0e39257e5b
commit
039b3d0abb
1 changed files with 3 additions and 0 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue