Skip to content

Commit

Permalink
Rollup merge of #77176 - austinkeeley:intrinsics-documentatation-erro…
Browse files Browse the repository at this point in the history
…r, 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.
  • Loading branch information
RalfJung authored Sep 25, 2020
2 parents 461038a + 1d3717d commit 0af0324
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0af0324

Please sign in to comment.