about summary refs log tree commit diff
path: root/compiler/rustc_attr_data_structures/src/lib.rs
diff options
context:
space:
mode:
authorJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-25 09:44:52 +0200
committerJonathan Brouwer <jonathantbrouwer@gmail.com>2025-06-27 09:08:21 +0200
commitf98ea3d144208113df2e644a88a650192fad57ad (patch)
tree3c66f88d8f4cce6beb5851456747faea6e95edec /compiler/rustc_attr_data_structures/src/lib.rs
parente61dd437f33b5a640e67dc3628397689c664c17f (diff)
downloadrust-f98ea3d144208113df2e644a88a650192fad57ad.tar.gz
rust-f98ea3d144208113df2e644a88a650192fad57ad.zip
Port `#[rustc_layout_scalar_valid_range_start/end]` to the new attribute parsing infrastructure
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Diffstat (limited to 'compiler/rustc_attr_data_structures/src/lib.rs')
-rw-r--r--compiler/rustc_attr_data_structures/src/lib.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/rustc_attr_data_structures/src/lib.rs b/compiler/rustc_attr_data_structures/src/lib.rs
index 86c73f0d9a0..8f8ce575a18 100644
--- a/compiler/rustc_attr_data_structures/src/lib.rs
+++ b/compiler/rustc_attr_data_structures/src/lib.rs
@@ -49,6 +49,16 @@ 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<T: PrintAttribute> PrintAttribute for &T {
     fn should_render(&self) -> bool {
         T::should_render(self)