diff options
| author | Jonas Schievink <jonas.schievink@ferrous-systems.com> | 2022-01-10 16:55:53 +0100 |
|---|---|---|
| committer | Jonas Schievink <jonas.schievink@ferrous-systems.com> | 2022-01-10 16:55:53 +0100 |
| commit | 601dc50b5ae0f8c0120b429d3e1fb703a26d3d0b (patch) | |
| tree | 3c65dcf4c166284d774322821a2049597cda7166 | |
| parent | 0f8c96c92689af8378dbe9f466c6bf15a3a27458 (diff) | |
| download | rust-601dc50b5ae0f8c0120b429d3e1fb703a26d3d0b.tar.gz rust-601dc50b5ae0f8c0120b429d3e1fb703a26d3d0b.zip | |
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 95d1550afc3..f02f4ac0247 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(()) |
