Skip to content

Commit 2f2d61a

Browse files
Rollup merge of rust-lang#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.
2 parents 55c0922 + 1c8c94a commit 2f2d61a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/libcore/mem.rs

Lines changed: 1 addition & 0 deletions
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)