1#[macro_export]
14macro_rules! array_flat {
15 ($([$($nested:expr),*]),* $(,)*) => {{
16 compile_error!("array_flat! only accepts a flat list of elements");
17 }};
18 ($tt:ty, $([$($nested:expr),*]),* $(,)*) => {{
19 compile_error!("array_flat! only accepts a flat list of elements");
20 }};
21 (Tuple2<$t1:ty, $t2:ty>, $($x:expr),* $(,)*) => {{
22 array_tuple!(Tuple2<$t1, $t2>, format!("{:?}", vec![$(vec![$x],)*]))
23 }};
24 (Tuple3<$t1:ty, $t2:ty, $t3:ty>, $($x:expr),* $(,)*) => {{
25 array_tuple!(Tuple3<$t1, $t2, $t3>, format!("{:?}", vec![$(vec![$x],)*]))
26 }};
27 (List<$tt:ty>, $($x:expr),* $(,)*) => {{
28 array_list!(List<$tt>, format!("{:?}", vec![$(vec![$x],)*]))
29 }};
30 (char, $($x:expr),* $(,)*) => {{
31 array_char!(format!("{:?}", vec![$(vec![$x],)*]))
32 }};
33 (String, $($x:expr),* $(,)*) => {{
34 array_string!(format!("{:?}", vec![$(vec![$x],)*]))
35 }};
36 ($tt:ty, $($x:expr),* $(,)*) => {{
37 array!($tt, vec![$($x,)*])
38 }};
39}