diff --git a/crates/hir_ty/src/display.rs b/crates/hir_ty/src/display.rs index 95d1550afc..f02f4ac024 100644 --- a/crates/hir_ty/src/display.rs +++ b/crates/hir_ty/src/display.rs @@ -151,6 +151,12 @@ impl<'a> HirFormatter<'a> { write!(self, "{}", sep)?; } first = false; + + // Abbreviate multiple omitted types with a single ellipsis. + if self.should_truncate() { + return write!(self, "{}", TYPE_HINT_TRUNCATION); + } + e.hir_fmt(self)?; } Ok(())