mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
generate Debug for enums
This commit is contained in:
parent
a1f2c7adcd
commit
4b7ae9fedc
2 changed files with 80 additions and 1 deletions
|
@ -311,6 +311,9 @@ pub fn expr_method_call(
|
|||
) -> ast::Expr {
|
||||
expr_from_text(&format!("{}.{}{}", receiver, method, arg_list))
|
||||
}
|
||||
pub fn expr_macro_call(f: ast::Expr, arg_list: ast::ArgList) -> ast::Expr {
|
||||
expr_from_text(&format!("{}!{}", f, arg_list))
|
||||
}
|
||||
pub fn expr_ref(expr: ast::Expr, exclusive: bool) -> ast::Expr {
|
||||
expr_from_text(&if exclusive { format!("&mut {}", expr) } else { format!("&{}", expr) })
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue