about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJohnathan Van Why <jrvanwhy@google.com>2019-01-24 16:06:35 -0800
committerJohnathan Van Why <jrvanwhy@google.com>2019-01-24 16:06:35 -0800
commit1c8c94af51e10e0593163d6a8ff41513271d7eab (patch)
tree4db57f899478e9c2a0c42927c84fb20d4b3f6993
parent0c54d2d12ee21f53657e76bf7d2ace9445520ff5 (diff)
downloadrust-1c8c94af51e10e0593163d6a8ff41513271d7eab.tar.gz
rust-1c8c94af51e10e0593163d6a8ff41513271d7eab.zip
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.
-rw-r--r--src/libcore/intrinsics.rs4
-rw-r--r--src/libcore/mem.rs1
2 files changed, 1 insertions, 4 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 74c0eae939c..db19baf7a2c 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 8fcbb73d9ce..4a9e0bb54cc 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**.