Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/item_tree/pretty.rs')
-rw-r--r--crates/hir-def/src/item_tree/pretty.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir-def/src/item_tree/pretty.rs b/crates/hir-def/src/item_tree/pretty.rs
index 5eeb8607b9..740759e6e3 100644
--- a/crates/hir-def/src/item_tree/pretty.rs
+++ b/crates/hir-def/src/item_tree/pretty.rs
@@ -291,7 +291,7 @@ impl Printer<'_> {
if idx == 0 && flags.contains(FnFlags::HAS_SELF_PARAM) {
w!(this, "self: ");
}
- if idx != params.len() {
+ if let Some(type_ref) = type_ref {
this.print_type_ref(type_ref);
} else {
wln!(this, "...");