mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-11-15 09:27:27 +00:00
Print a single ellipsis for any number of omitted types
This commit is contained in:
parent
0f8c96c926
commit
601dc50b5a
1 changed files with 6 additions and 0 deletions
|
@ -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(())
|
||||
|
|
Loading…
Reference in a new issue