@@ -77,6 +77,31 @@ pub use saturating::Saturating;
77
77
#[stable(feature = "rust1", since = "1.0.0")]
78
78
pub use wrapping::Wrapping;
79
79
80
+ macro_rules! u8_xe_bytes_doc {
81
+ () => {
82
+ "
83
+
84
+ **Note**: This function is meaningless on `u8`. Byte order does not exist as a
85
+ concept for byte-sized integers. This function is only provided in symmetry
86
+ with larger integer types.
87
+
88
+ "
89
+ };
90
+ }
91
+
92
+ macro_rules! i8_xe_bytes_doc {
93
+ () => {
94
+ "
95
+
96
+ **Note**: This function is meaningless on `i8`. Byte order does not exist as a
97
+ concept for byte-sized integers. This function is only provided in symmetry
98
+ with larger integer types. You can cast from and to `u8` using `as i8` and `as
99
+ u8`.
100
+
101
+ "
102
+ };
103
+ }
104
+
80
105
macro_rules! usize_isize_to_xe_bytes_doc {
81
106
() => {
82
107
"
@@ -348,8 +373,8 @@ impl i8 {
348
373
reversed = "0x48",
349
374
le_bytes = "[0x12]",
350
375
be_bytes = "[0x12]",
351
- to_xe_bytes_doc = "" ,
352
- from_xe_bytes_doc = "" ,
376
+ to_xe_bytes_doc = i8_xe_bytes_doc!() ,
377
+ from_xe_bytes_doc = i8_xe_bytes_doc!() ,
353
378
bound_condition = "",
354
379
}
355
380
midpoint_impl! { i8, i16, signed }
@@ -547,8 +572,8 @@ impl u8 {
547
572
reversed = "0x48",
548
573
le_bytes = "[0x12]",
549
574
be_bytes = "[0x12]",
550
- to_xe_bytes_doc = "" ,
551
- from_xe_bytes_doc = "" ,
575
+ to_xe_bytes_doc = u8_xe_bytes_doc!() ,
576
+ from_xe_bytes_doc = u8_xe_bytes_doc!() ,
552
577
bound_condition = "",
553
578
}
554
579
widening_impl! { u8, u16, 8, unsigned }
0 commit comments