We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f6b678 commit 6b6217cCopy full SHA for 6b6217c
src/lib.rs
@@ -60,6 +60,13 @@ struct Node<T> {
60
value: T,
61
}
62
63
+fn _static_assert_size_of_node() {
64
+ // "Instanciating" the generic `transmute` function without calling it
65
+ // still triggers the magic compile-time check
66
+ // that input and output types have the same `size_of()`.
67
+ let _ = std::mem::transmute::<Node<()>, [usize; 9]>;
68
+}
69
+
70
impl<T> Node<T> {
71
fn new(value: T) -> Self {
72
Node {
0 commit comments