11247: Print a single ellipsis for any number of omitted types r=jonas-schievink a=jonas-schievink

Helps a little bit with https://github.com/rust-analyzer/rust-analyzer/issues/11240

bors r+

Co-authored-by: Jonas Schievink <jonas.schievink@ferrous-systems.com>
This commit is contained in:
bors[bot] 2022-01-10 15:56:54 +00:00 committed by GitHub
commit 8dd58ceb7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,12 @@ pub fn write_joined<T: HirDisplay>(
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(())