From 354fb6be916dc20820b6a8d341c2582005683bb6 Mon Sep 17 00:00:00 2001 From: Bruno Tavares Date: Sat, 31 Oct 2015 19:40:36 -0200 Subject: [PATCH] 23524 Reference rust-lang/rust#23524 --- src/23524.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/23524.rs diff --git a/src/23524.rs b/src/23524.rs new file mode 100644 index 00000000..bc3d7f6f --- /dev/null +++ b/src/23524.rs @@ -0,0 +1,21 @@ +enum Tree { + Leaf(K, V), + Branch(u16, [Option>>]), +} + +struct Node { + population: u16, + children: T, +} + +enum Tree2 { + Leaf(K, V), + Branch(Node>), +} + +fn main() { + use std::mem::size_of; + use std::sync::atomic; + println!("{:?}", size_of::<&Tree<(),()>>()); + println!("{:?}", size_of::<&Tree2<(),()>>()); +}