Merge #11247
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:
commit
8dd58ceb7b
@ -151,6 +151,12 @@ pub fn write_joined<T: HirDisplay>(
|
|||||||
write!(self, "{}", sep)?;
|
write!(self, "{}", sep)?;
|
||||||
}
|
}
|
||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
|
// Abbreviate multiple omitted types with a single ellipsis.
|
||||||
|
if self.should_truncate() {
|
||||||
|
return write!(self, "{}", TYPE_HINT_TRUNCATION);
|
||||||
|
}
|
||||||
|
|
||||||
e.hir_fmt(self)?;
|
e.hir_fmt(self)?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Loading…
Reference in New Issue
Block a user