Only use ...
instead of _
for type elision
`_` might confuse people into believing that the type isn't known, while `...` is not used anywhere else for types and is not valid syntax, making it more likely to convey the right understanding.
This commit is contained in:
parent
4ed1376490
commit
3debf5006a
6 changed files with 6 additions and 10 deletions
|
@ -1765,11 +1765,7 @@ impl<'tcx> Printer<'tcx> for FmtPrinter<'_, 'tcx> {
|
|||
self.pretty_print_type(ty)
|
||||
} else {
|
||||
self.truncated = true;
|
||||
if let ty::Adt(_, substs) = ty.kind() && substs.len() > 0 {
|
||||
write!(self, "...")?;
|
||||
} else {
|
||||
write!(self, "_")?;
|
||||
}
|
||||
write!(self, "...")?;
|
||||
Ok(self)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue