Print a single ellipsis for any number of omitted types

This commit is contained in:
Jonas Schievink 2022-01-10 16:55:53 +01:00
parent 0f8c96c926
commit 601dc50b5a

View file

@ -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(())