// NB: transitionary, de-mode-ing. #[forbid(deprecated_mode)]; #[forbid(deprecated_pattern)]; /// Interfaces used for comparison. trait ord { pure fn lt(&&other: self) -> bool; } trait eq { pure fn eq(&&other: self) -> bool; } pure fn lt(v1: &T, v2: &T) -> bool { v1.lt(*v2) } pure fn le(v1: &T, v2: &T) -> bool { v1.lt(*v2) || v1.eq(*v2) } pure fn eq(v1: &T, v2: &T) -> bool { v1.eq(*v2) }