]>
Commit | Line | Data |
---|---|---|
1a4d82fc | 1 | // #12402 Operator overloading only considers the method name, not which trait is implemented |
223e47cc | 2 | |
1a4d82fc JJ |
3 | trait MyMul<Rhs, Res> { |
4 | fn mul(&self, rhs: &Rhs) -> Res; | |
223e47cc LB |
5 | } |
6 | ||
1a4d82fc | 7 | fn foo<T: MyMul<f64, f64>>(a: &T, b: f64) -> f64 { |
29967ef6 | 8 | a * b //~ ERROR cannot multiply `&T` by `f64` |
223e47cc LB |
9 | } |
10 | ||
11 | fn main() {} |