From 1c8c94af51e10e0593163d6a8ff41513271d7eab Mon Sep 17 00:00:00 2001 From: Johnathan Van Why Date: Thu, 24 Jan 2019 16:06:35 -0800 Subject: [PATCH] Instead of adding a paragraph mentioning std::mem::transmute and core::mem::transmute, create documentation pages for them. This renders them discoverable via search. I removed the mention of the exports in the transmute documentation, but can re-add it if desired. --- src/libcore/intrinsics.rs | 4 ---- src/libcore/mem.rs | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 74c0eae939cb4..db19baf7a2c64 100644 --- a/src/libcore/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -729,10 +729,6 @@ extern "rust-intrinsic" { /// cause [undefined behavior][ub] with this function. `transmute` should be /// the absolute last resort. /// - /// `transmute` is re-exported by [core::mem](../mem/index.html) as - /// `core::mem::transmute`, which may be used without the `core_intrinsics` - /// feature flag. - /// /// The [nomicon](../../nomicon/transmutes.html) has additional /// documentation. /// diff --git a/src/libcore/mem.rs b/src/libcore/mem.rs index 8fcbb73d9ce46..4a9e0bb54cc08 100644 --- a/src/libcore/mem.rs +++ b/src/libcore/mem.rs @@ -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**.