From 25f08ea9a4cd4051a7d8a711603c9bcc2e72425c Mon Sep 17 00:00:00 2001 From: Colin Cai Date: Wed, 21 Feb 2024 13:07:51 -0500 Subject: [PATCH] touch up transmute documentation --- src/transmute.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/transmute.rs b/src/transmute.rs index 8430a8a..1b36c90 100644 --- a/src/transmute.rs +++ b/src/transmute.rs @@ -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`, interpreted as a `Box`, out of the dangling reference and we've transmuted our data! /// +/// # Safety +/// lol +/// pub fn transmute(obj: A) -> B { use std::hint::black_box;