Avoid some code duplication around getting names of numeric types.

This commit is contained in:
Michael Woerister 2015-11-23 15:59:36 +01:00
parent 4891c00634
commit 3be1d8ca7d
6 changed files with 44 additions and 110 deletions

View file

@ -1258,7 +1258,7 @@ impl fmt::Debug for IntTy {
impl fmt::Display for IntTy {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", ast_util::int_ty_to_string(*self, None))
write!(f, "{}", ast_util::int_ty_to_string(*self))
}
}
@ -1303,7 +1303,7 @@ impl fmt::Debug for UintTy {
impl fmt::Display for UintTy {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", ast_util::uint_ty_to_string(*self, None))
write!(f, "{}", ast_util::uint_ty_to_string(*self))
}
}