about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Schievink <jonasschievink@gmail.com>2020-09-25 19:42:50 +0200
committerGitHub <noreply@github.com>2020-09-25 19:42:50 +0200
commita7bdf851cfc869fe0a1938705bc62493034c2ea0 (patch)
treece20eac7e93ec2cc217550f6a080ed4921fe60ba
parente739468f97f241e02d63150821d1858d2e1b0af3 (diff)
parent1d3717d17c8891db85a8316ea869a3ceca60b53d (diff)
downloadrust-a7bdf851cfc869fe0a1938705bc62493034c2ea0.tar.gz
rust-a7bdf851cfc869fe0a1938705bc62493034c2ea0.zip
Rollup merge of #77176 - austinkeeley:intrinsics-documentatation-error, r=jyn514
Removing erroneous semicolon in transmute documentation

There is a semicolon in the example code that causes the expected value to not be returned.
-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 de6b9800a6c..243fc7bfaa5 100644
--- a/library/core/src/intrinsics.rs
+++ b/library/core/src/intrinsics.rs
@@ -905,7 +905,7 @@ extern "rust-intrinsic" {
     /// let raw_bytes = [0x78, 0x56, 0x34, 0x12];
     ///
     /// let num = unsafe {
-    ///     std::mem::transmute::<[u8; 4], u32>(raw_bytes);
+    ///     std::mem::transmute::<[u8; 4], u32>(raw_bytes)
     /// };
     ///
     /// // use `u32::from_ne_bytes` instead