Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/display.rs')
-rw-r--r--crates/hir_ty/src/display.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs
index 4b077c2c8a..377821b376 100644
--- a/crates/hir_ty/src/display.rs
+++ b/crates/hir_ty/src/display.rs
@@ -1103,9 +1103,10 @@ impl HirDisplay for TypeRef {
write!(f, "{}: ", name)?;
param_type.hir_fmt(f)?;
}
- None => write!(f, " : {:?}", param_type)?,
+ None => param_type.hir_fmt(f)?,
};
+ // Last index contains the return type so we stop writing commas on the second-to-last index
if index != parameters.len() - 2 {
write!(f, ", ")?;
}