Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-assists/src/utils.rs')
-rw-r--r--crates/ide-assists/src/utils.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ide-assists/src/utils.rs b/crates/ide-assists/src/utils.rs
index c05310b342..fdc5dd13eb 100644
--- a/crates/ide-assists/src/utils.rs
+++ b/crates/ide-assists/src/utils.rs
@@ -351,7 +351,7 @@ fn invert_special_case_legacy(expr: &ast::Expr) -> Option<ast::Expr> {
"is_err" => "is_ok",
_ => return None,
};
- Some(make::expr_method_call(receiver, make::name_ref(method), arg_list))
+ Some(make::expr_method_call(receiver, make::name_ref(method), arg_list).into())
}
ast::Expr::PrefixExpr(pe) if pe.op_kind()? == ast::UnaryOp::Not => match pe.expr()? {
ast::Expr::ParenExpr(parexpr) => parexpr.expr(),
@@ -856,6 +856,7 @@ impl ReferenceConversion {
make::expr_ref(expr, false)
} else {
make::expr_method_call(expr, make::name_ref("as_ref"), make::arg_list([]))
+ .into()
}
}
}