Skip to content

Commit

Permalink
Rollup merge of rust-lang#57848 - jrvanwhy:transmute-export-doc, r=Qu…
Browse files Browse the repository at this point in the history
…ietMisdreavus

Generate a documentation page for core::mem::transmute.

In `#[no_std]` environments, `std::mem::transmute` is unavailable. Searching for "core transmute" online only pulls up `core::intrinsics::transmute`, which is behind the (unstable) `core_intrinsics` feature flag. Users wishing to use transmute in `#[no_std]` environments typically should use `core::mem::transmute` instead, as it is stable. This documentation makes `core::mem::transmute` discoverable.
  • Loading branch information
GuillaumeGomez committed Feb 7, 2019
2 parents 55c0922 + 1c8c94a commit 2f2d61a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/libcore/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use ptr;
use ops::{Deref, DerefMut};

#[stable(feature = "rust1", since = "1.0.0")]
#[doc(inline)]
pub use intrinsics::transmute;

/// Takes ownership and "forgets" about the value **without running its destructor**.
Expand Down

0 comments on commit 2f2d61a

Please sign in to comment.