Skip to content

Commit 1c8c94a

Browse files
committed
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.
1 parent 0c54d2d commit 1c8c94a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/libcore/intrinsics.rs

-4
Original file line numberDiff line numberDiff line change
@@ -729,10 +729,6 @@ extern "rust-intrinsic" {
729729
/// cause [undefined behavior][ub] with this function. `transmute` should be
730730
/// the absolute last resort.
731731
///
732-
/// `transmute` is re-exported by [core::mem](../mem/index.html) as
733-
/// `core::mem::transmute`, which may be used without the `core_intrinsics`
734-
/// feature flag.
735-
///
736732
/// The [nomicon](../../nomicon/transmutes.html) has additional
737733
/// documentation.
738734
///

src/libcore/mem.rs

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use ptr;
1515
use ops::{Deref, DerefMut};
1616

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

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

0 commit comments

Comments
 (0)