#![allow(unused_variables)] extern crate rust_typed; use rust_typed::type_it; #[type_it] struct Container { a: i32, b: Vec, c: Vec, d: C, e: T } #[type_it] struct Tuple(i32, i32); #[type_it] 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: 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); }