Unnamed repository; edit this file 'description' to name the repository.
Print a single ellipsis for any number of omitted types
| -rw-r--r-- | crates/hir_ty/src/display.rs | 6 |
1 files changed, 6 insertions, 0 deletions
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(()) |