Skip to content

Commit

Permalink
touch up transmute documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Creative0708 committed Feb 21, 2024
1 parent d3f6321 commit 25f08ea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transmute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/// Then, we overwrite the dummy variable with a `DummyEnum::A(Some(<...>))` with the object we want to transmute.
/// Finally, we take the `Box<A>`, interpreted as a `Box<B>`, out of the dangling reference and we've transmuted our data!
///
/// # Safety
/// lol
///
pub fn transmute<A, B>(obj: A) -> B {
use std::hint::black_box;

Expand Down

0 comments on commit 25f08ea

Please sign in to comment.