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 committed Sep 25, 2020
2 parents 19d9a59 + 1d3717d commit dfd0385
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/intrinsics.rs
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 dfd0385

Please sign in to comment.