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.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/crates/hir_def/src/item_tree/pretty.rs b/crates/hir_def/src/item_tree/pretty.rs
index 4b46283743..eaaff5a21f 100644
--- a/crates/hir_def/src/item_tree/pretty.rs
+++ b/crates/hir_def/src/item_tree/pretty.rs
@@ -257,8 +257,11 @@ impl<'a> Printer<'a> {
for param in params.clone() {
this.print_attrs_of(param);
match &this.tree[param] {
- Param::Normal(ty) => {
- w!(this, "_: ");
+ Param::Normal(name, ty) => {
+ match name {
+ Some(name) => w!(this, "{}: ", name),
+ None => w!(this, "_: "),
+ }
this.print_type_ref(ty);
wln!(this, ",");
}