Skip to content

Commit 69c5ba9

Browse files
committed
fix(transmute): cargo doesn't warn about dummy enum
1 parent ab0d48f commit 69c5ba9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/transmute.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub fn transmute<A, B>(obj: A) -> B {
3333
// Note that `data` is shared between `DummyEnum::A` and `DummyEnum::B`.
3434
// This should hopefully be more reliable than spamming the stack with a value and hoping the memory
3535
// is placed correctly by the compiler.
36+
#[allow(dead_code)]
3637
enum DummyEnum<A, B> {
3738
A(Option<Box<A>>),
3839
B(Option<Box<B>>),

0 commit comments

Comments
 (0)