mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-23 11:54:25 +00:00
Merge the inline function/method assists into inline_call
This commit is contained in:
parent
688398febc
commit
14e18bfa38
4 changed files with 47 additions and 90 deletions
|
@ -338,7 +338,6 @@ pub fn arg_list(args: impl IntoIterator<Item = ast::Expr>) -> ast::ArgList {
|
|||
}
|
||||
|
||||
pub fn ident_pat(ref_: bool, mut_: bool, name: ast::Name) -> ast::IdentPat {
|
||||
use std::fmt::Write as _;
|
||||
let mut s = String::from("fn f(");
|
||||
if ref_ {
|
||||
s.push_str("ref ");
|
||||
|
@ -346,7 +345,7 @@ pub fn ident_pat(ref_: bool, mut_: bool, name: ast::Name) -> ast::IdentPat {
|
|||
if mut_ {
|
||||
s.push_str("mut ");
|
||||
}
|
||||
let _ = write!(s, "{}", name);
|
||||
format_to!(s, "{}", name);
|
||||
s.push_str(": ())");
|
||||
ast_from_text(&s)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue