mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Type-safer API for dealing with parameter lists with optional self
This commit is contained in:
parent
455a0cfda2
commit
6f51f728a1
4 changed files with 21 additions and 10 deletions
|
@ -139,7 +139,7 @@ fn add_function_impl(
|
|||
) {
|
||||
let fn_name = func.name(ctx.db).to_string();
|
||||
|
||||
let label = if func.params(ctx.db).is_empty() {
|
||||
let label = if func.assoc_fn_params(ctx.db).is_empty() {
|
||||
format!("fn {}()", fn_name)
|
||||
} else {
|
||||
format!("fn {}(..)", fn_name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue