about summary refs log tree commit diff
diff options
context:
space:
mode:
authorThomas M. DuBuisson <thomas.dubuisson@gmail.com>2023-05-09 14:08:13 -0700
committerGitHub <noreply@github.com>2023-05-09 14:08:13 -0700
commit55d86b9da864ac4540b164f51b42fe05bbb4912c (patch)
tree0a21ac6d022eb3f5c87672613a46ad129f27161e
parent3a37c2f0523c87147b64f1b8099fc9df22e8c53e (diff)
downloadrust-55d86b9da864ac4540b164f51b42fe05bbb4912c.tar.gz
rust-55d86b9da864ac4540b164f51b42fe05bbb4912c.zip
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.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs
index 3f2b1595d62..279a1866892 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];