1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// this test check the macro exist use duang::duang; duang!( pub fn foo<T>(a: T,b: f64 = 13.0, c: T = a*a) where T: std::ops::Mul<T, Output = T>, T: std::fmt::Display, T: Copy, { let _result = (a,b,c); } ); fn main() { foo!(a=10); }