mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-25 09:27:43 +00:00
fix: make::expr_closure() -> ClosureExpr
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
This commit is contained in:
parent
92a7890814
commit
728d72fbe1
3 changed files with 6 additions and 7 deletions
|
|
@ -652,7 +652,10 @@ pub fn expr_ref(expr: ast::Expr, exclusive: bool) -> ast::Expr {
|
|||
pub fn expr_reborrow(expr: ast::Expr) -> ast::Expr {
|
||||
expr_from_text(&format!("&mut *{expr}"))
|
||||
}
|
||||
pub fn expr_closure(pats: impl IntoIterator<Item = ast::Param>, expr: ast::Expr) -> ast::Expr {
|
||||
pub fn expr_closure(
|
||||
pats: impl IntoIterator<Item = ast::Param>,
|
||||
expr: ast::Expr,
|
||||
) -> ast::ClosureExpr {
|
||||
let params = pats.into_iter().join(", ");
|
||||
expr_from_text(&format!("|{params}| {expr}"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue