From 37fa60bbf14911ebdbd942c37444fb53460db6a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jana=20D=C3=B6nszelmann?= Date: Tue, 14 Oct 2025 13:42:38 +0200 Subject: [PATCH] pretty print u128 with display --- compiler/rustc_hir/src/attrs/pretty_printing.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/compiler/rustc_hir/src/attrs/pretty_printing.rs b/compiler/rustc_hir/src/attrs/pretty_printing.rs index d13cd3fd1dab0..ea86dfbd9c80e 100644 --- a/compiler/rustc_hir/src/attrs/pretty_printing.rs +++ b/compiler/rustc_hir/src/attrs/pretty_printing.rs @@ -26,16 +26,6 @@ pub trait PrintAttribute { fn print_attribute(&self, p: &mut Printer); } -impl PrintAttribute for u128 { - fn should_render(&self) -> bool { - true - } - - fn print_attribute(&self, p: &mut Printer) { - p.word(self.to_string()) - } -} - impl PrintAttribute for &T { fn should_render(&self) -> bool { T::should_render(self) @@ -148,7 +138,7 @@ macro_rules! print_tup { print_tup!(A B C D E F G H); print_skip!(Span, (), ErrorGuaranteed); -print_disp!(u16, bool, NonZero, Limit); +print_disp!(u16, u128, bool, NonZero, Limit); print_debug!( Symbol, Ident,