]> git.proxmox.com Git - rustc.git/blame - src/test/ui/traits/resolution-in-overloaded-op.rs
Merge tag 'debian/1.52.1+dfsg1-1_exp2' into proxmox/buster
[rustc.git] / src / test / ui / traits / resolution-in-overloaded-op.rs
CommitLineData
1a4d82fc 1// #12402 Operator overloading only considers the method name, not which trait is implemented
223e47cc 2
1a4d82fc
JJ
3trait MyMul<Rhs, Res> {
4 fn mul(&self, rhs: &Rhs) -> Res;
223e47cc
LB
5}
6
1a4d82fc 7fn foo<T: MyMul<f64, f64>>(a: &T, b: f64) -> f64 {
29967ef6 8 a * b //~ ERROR cannot multiply `&T` by `f64`
223e47cc
LB
9}
10
11fn main() {}