Skip to content

Commit a8b0d56

Browse files
authored
Rollup merge of rust-lang#139532 - bjoernager:master, r=tgross35
Update `u8`-to-and-from-`i8` suggestions. `u8::cast_signed` and `i8::cast_unsigned` have been stabilised, but `i8::from_ne_bytes` et al. still suggest using `as i8` or `as u8`.
2 parents 78e59af + f2dee82 commit a8b0d56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: library/core/src/num/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ macro_rules! i8_xe_bytes_doc {
9999
100100
**Note**: This function is meaningless on `i8`. Byte order does not exist as a
101101
concept for byte-sized integers. This function is only provided in symmetry
102-
with larger integer types. You can cast from and to `u8` using `as i8` and `as
103-
u8`.
102+
with larger integer types. You can cast from and to `u8` using
103+
[`cast_signed`](u8::cast_signed) and [`cast_unsigned`](Self::cast_unsigned).
104104
105105
"
106106
};

0 commit comments

Comments
 (0)