]> git.proxmox.com Git - rustc.git/blame - src/test/ui/associated-types/associate-type-bound-normalization.rs
New upstream version 1.67.1+dfsg1
[rustc.git] / src / test / ui / associated-types / associate-type-bound-normalization.rs
CommitLineData
29967ef6
XL
1// Make sure that we normalize bounds on associated types before checking them
2// as candidates.
3
4// check-pass
5
6trait Mul<T> {
7 type Output;
8}
9
10trait Matrix: Mul<<Self as Matrix>::Row, Output = ()> {
11 type Row;
12
13 type Transpose: Matrix<Row = Self::Row>;
14}
15
16fn is_mul<S, T: Mul<S, Output = ()>>() {}
17
18fn f<T: Matrix>() {
19 // The unnormalized bound on `T::Transpose` is
20 // `Mul<<T::Transpose as Matrix>::Row` which has to be normalized to be
21 // equal to `T::Row`.
22 is_mul::<T::Row, T::Transpose>();
23}
24
25fn main() {}