Skip to content

Commit f60a174

Browse files
authored
Rollup merge of #111408 - TomMD:patch-1, r=workingjubilee
Fix incorrect implication of transmuting slices transmute<&[u8]> would be useful and as a beginner it is confusing to see documents casually confuse the types of &[u8] and [u8; SZ]
2 parents 3d4d670 + 55d86b9 commit f60a174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/core/src/intrinsics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ extern "rust-intrinsic" {
11871187
/// Below are common applications of `transmute` which can be replaced with safer
11881188
/// constructs.
11891189
///
1190-
/// Turning raw bytes (`&[u8]`) into `u32`, `f64`, etc.:
1190+
/// Turning raw bytes (`[u8; SZ]`) into `u32`, `f64`, etc.:
11911191
///
11921192
/// ```
11931193
/// let raw_bytes = [0x78, 0x56, 0x34, 0x12];

0 commit comments

Comments
 (0)