#![allow(unused_variables)] extern crate dismantler; use dismantler::dismantle; #[dismantle] struct Container { a: i32, b: Vec, c: Vec, d: C, e: T } #[dismantle] struct Tuple(i32, i32); #[dismantle] struct Tuple2(i32, T); fn main() { let a: Container::fields::a = 10; let b: Container::b = vec![a]; let c: Container::c = vec![10]; let c: Container::c = c; let c: as Container::protocol>::c = c; let d: as Container::protocol>::d = 10; let container: Container::core = Container::core { a, b, c, d, e: 10 }; assert!(container.a == a); }