extern crate yaiouom; use yaiouom::*; use yaiouom::si::*; struct Kilometer; impl BaseUnit for Kilometer { const NAME: &'static str = "km"; } struct Foo where T: std::ops::Div + Copy { distance: Measure, duration: Measure } impl Foo where T: std::ops::Div + Copy { fn get_speed_bad_unify(&self) -> Measure>> { (self.distance / self.duration).unify() //~ERROR } } fn main() { let foo = Foo { distance: Meter::new(1.0), duration: Second::new(1.0), }; let _ = foo.get_speed_bad_unify(); }