Skip to content

Commit 601dc50

Browse files
author
Jonas Schievink
committed
Print a single ellipsis for any number of omitted types
1 parent 0f8c96c commit 601dc50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/hir_ty/src/display.rs

+6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ impl<'a> HirFormatter<'a> {
151151
write!(self, "{}", sep)?;
152152
}
153153
first = false;
154+
155+
// Abbreviate multiple omitted types with a single ellipsis.
156+
if self.should_truncate() {
157+
return write!(self, "{}", TYPE_HINT_TRUNCATION);
158+
}
159+
154160
e.hir_fmt(self)?;
155161
}
156162
Ok(())

0 commit comments

Comments
 (0)