mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
args -> params
This commit is contained in:
parent
5db5f5cc1d
commit
1ed7fbfc1b
8 changed files with 37 additions and 37 deletions
|
@ -63,7 +63,7 @@ fn complete_methods(
|
|||
) -> Cancelable<()> {
|
||||
receiver.iterate_methods(ctx.db, |func| {
|
||||
let sig = func.signature(ctx.db);
|
||||
if sig.has_self_arg() {
|
||||
if sig.has_self_param() {
|
||||
CompletionItem::new(CompletionKind::Reference, sig.name().to_string())
|
||||
.from_function(ctx, func)
|
||||
.kind(CompletionItemKind::Method)
|
||||
|
|
|
@ -191,7 +191,7 @@ impl Builder {
|
|||
) -> Builder {
|
||||
// If not an import, add parenthesis automatically.
|
||||
if ctx.use_item_syntax.is_none() && !ctx.is_call {
|
||||
if function.signature(ctx.db).args().is_empty() {
|
||||
if function.signature(ctx.db).params().is_empty() {
|
||||
self.snippet = Some(format!("{}()$0", self.label));
|
||||
} else {
|
||||
self.snippet = Some(format!("{}($0)", self.label));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue