Rollup merge of #57848 - jrvanwhy:transmute-export-doc, r=QuietMisdreavus

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.
This commit is contained in:
Guillaume Gomez 2019-02-07 14:28:29 +01:00 committed by GitHub
commit 2f2d61a0f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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**.