Skip to content

Commit

Permalink
Instead of adding a paragraph mentioning std::mem::transmute and core…
Browse files Browse the repository at this point in the history
…::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.
  • Loading branch information
jrvanwhy committed Jan 25, 2019
1 parent 0c54d2d commit 1c8c94a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 0 additions & 4 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand Down
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 1c8c94a

Please sign in to comment.