]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-types/issue-48551.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / associated-types / issue-48551.rs
CommitLineData
60c5eb7d 1// check-pass
0531ce1d
XL
2// Regression test for #48551. Covers a case where duplicate candidates
3// arose during associated type projection.
4
5use std::ops::{Mul, MulAssign};
6
7pub trait ClosedMul<Right>: Sized + Mul<Right, Output = Self> + MulAssign<Right> {}
8impl<T, Right> ClosedMul<Right> for T
9where
10 T: Mul<Right, Output = T> + MulAssign<Right>,
11{
12}
13
14pub trait InnerSpace: ClosedMul<<Self as InnerSpace>::Real> {
15 type Real;
16}
17
18pub trait FiniteDimVectorSpace: ClosedMul<<Self as FiniteDimVectorSpace>::Field> {
19 type Field;
20}
21
22pub trait FiniteDimInnerSpace
23 : InnerSpace + FiniteDimVectorSpace<Field = <Self as InnerSpace>::Real> {
24}
25
26pub trait EuclideanSpace: ClosedMul<<Self as EuclideanSpace>::Real> {
27 type Coordinates: FiniteDimInnerSpace<Real = Self::Real>
28 + Mul<Self::Real, Output = Self::Coordinates>
29 + MulAssign<Self::Real>;
30
31 type Real;
32}
33
34fn main() {}