1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
use super::X; pub trait New { fn new(a: i32) -> X; } impl New for X { fn new(a: i32) -> X { X { a } } }