@@ -65,7 +65,8 @@ macro_rules! impl_reg {
6565#[ repr( u8 ) ]
6666#[ derive( Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
6767#[ cfg_attr( feature = "arbitrary" , derive( arbitrary:: Arbitrary ) ) ]
68- #[ allow( non_camel_case_types, missing_docs) ]
68+ #[ allow( missing_docs, reason = "self-describing variants" ) ]
69+ #[ expect( non_camel_case_types, reason = "matching in-asm register names" ) ]
6970#[ rustfmt:: skip]
7071pub enum XReg {
7172 x0, x1, x2, x3, x4, x5, x6, x7, x8, x9,
@@ -107,7 +108,8 @@ fn assert_special_start_is_right() {
107108#[ repr( u8 ) ]
108109#[ derive( Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
109110#[ cfg_attr( feature = "arbitrary" , derive( arbitrary:: Arbitrary ) ) ]
110- #[ allow( non_camel_case_types, missing_docs) ]
111+ #[ allow( missing_docs, reason = "self-describing variants" ) ]
112+ #[ expect( non_camel_case_types, reason = "matching in-asm register names" ) ]
111113#[ rustfmt:: skip]
112114pub enum FReg {
113115 f0, f1, f2, f3, f4, f5, f6, f7, f8, f9,
@@ -120,7 +122,8 @@ pub enum FReg {
120122#[ repr( u8 ) ]
121123#[ derive( Debug , Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
122124#[ cfg_attr( feature = "arbitrary" , derive( arbitrary:: Arbitrary ) ) ]
123- #[ allow( non_camel_case_types, missing_docs) ]
125+ #[ allow( missing_docs, reason = "self-describing variants" ) ]
126+ #[ expect( non_camel_case_types, reason = "matching in-asm register names" ) ]
124127#[ rustfmt:: skip]
125128pub enum VReg {
126129 v0, v1, v2, v3, v4, v5, v6, v7, v8, v9,
@@ -137,7 +140,7 @@ impl_reg!(VReg, V, 0..32);
137140///
138141/// Never appears inside an instruction -- instructions always name a particular
139142/// class of register -- but this is useful for testing and things like that.
140- #[ allow( missing_docs) ]
143+ #[ allow( missing_docs, reason = "self-describing variants" ) ]
141144#[ derive( Clone , Copy , PartialEq , Eq , PartialOrd , Ord , Hash ) ]
142145#[ cfg_attr( feature = "arbitrary" , derive( arbitrary:: Arbitrary ) ) ]
143146pub enum AnyReg {
0 commit comments