diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2022-11-16 20:07:15 -0800 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2022-11-18 08:46:47 -0800 |
| commit | 3debf5006aa9d6810e4691fa03c6660ab998bae7 (patch) | |
| tree | 4552c583695a8dccd5cfcefafec4f2a00d2adea5 /compiler | |
| parent | 4ed1376490dbc80a204ca8ff4cabf9667a7e141d (diff) | |
| download | rust-3debf5006aa9d6810e4691fa03c6660ab998bae7.tar.gz rust-3debf5006aa9d6810e4691fa03c6660ab998bae7.zip | |
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.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/print/pretty.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/rustc_middle/src/ty/print/pretty.rs b/compiler/rustc_middle/src/ty/print/pretty.rs index faa57b437d9..f17dc1cedbb 100644 --- a/compiler/rustc_middle/src/ty/print/pretty.rs +++ b/compiler/rustc_middle/src/ty/print/pretty.rs @@ -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) } } |
