diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-05-10 06:12:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-10 06:12:15 +0200 |
| commit | f60a174c2de3204024f8a617f6568b1d7bc4a398 (patch) | |
| tree | b4abd0427a85c1dd22813ca17de965a4371c5676 | |
| parent | 3d4d6703a9d54b3285811813fc98b6b30abda03c (diff) | |
| parent | 55d86b9da864ac4540b164f51b42fe05bbb4912c (diff) | |
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]
| -rw-r--r-- | library/core/src/intrinsics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 9c02029f935..23ded42fa66 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -1187,7 +1187,7 @@ extern "rust-intrinsic" { /// Below are common applications of `transmute` which can be replaced with safer /// constructs. /// - /// Turning raw bytes (`&[u8]`) into `u32`, `f64`, etc.: + /// Turning raw bytes (`[u8; SZ]`) into `u32`, `f64`, etc.: /// /// ``` /// let raw_bytes = [0x78, 0x56, 0x34, 0x12]; |
