mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-20 02:20:21 +00:00
debug for record field structs
This commit is contained in:
parent
e2ab2e12a0
commit
fd7236c791
3 changed files with 32 additions and 17 deletions
|
@ -318,6 +318,9 @@ pub fn expr_closure(pats: impl IntoIterator<Item = ast::Param>, expr: ast::Expr)
|
|||
let params = pats.into_iter().join(", ");
|
||||
expr_from_text(&format!("|{}| {}", params, expr))
|
||||
}
|
||||
pub fn expr_field(receiver: ast::Expr, field: &str) -> ast::Expr {
|
||||
expr_from_text(&format!("{}.{}", receiver, field))
|
||||
}
|
||||
pub fn expr_paren(expr: ast::Expr) -> ast::Expr {
|
||||
expr_from_text(&format!("({})", expr))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue