blob: 90f0ea8469b983986259abfd9fb929ea258f8f3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
//@ check-pass
// https://github.com/rust-lang/rust/issues/119792
struct Wrapper<T>(T);
trait Div<Rhs> {}
trait Mul<Rhs> {
type Output;
}
impl<T> Mul<T> for Wrapper<T> {
type Output = ();
}
impl<T> Div<Self> for Wrapper<T> {}
pub trait NumOps<Rhs> {}
impl<T, Rhs> NumOps<Rhs> for T where T: Mul<Rhs, Output = ()> + Div<Rhs> {}
|