#![allow(clippy::ptr_arg)] use std::any::Any; use swc_visit::define; /// Visitable nodes. pub trait Node: Any {} impl Node for T where T: Any {} #[derive(Debug, PartialEq)] pub struct Item { // pub field: usize, // pub inner: Option>, pub opt_vec: Option>, pub vec_opt: Vec>, pub value: f64, } #[derive(Debug, PartialEq)] pub enum Enum { Item(Item), Boxed(Box), } define!({ pub struct Item { // pub field: usize, // pub inner: Option>, pub opt_vec: Option>, pub vec_opt: Vec>, pub value: f64, } pub enum Enum { Item(Item), Boxed(Box), } });