summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/lazy-norm/equating-projection-cyclically.rs
blob: 019c6e81c50e9affd64e64cc22d04a71a0660172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// compile-flags: -Ztrait-solver=next
// known-bug: unknown

trait Test {
    type Assoc;
}

fn transform<T: Test>(x: T) -> T::Assoc {
    todo!()
}

impl Test for i32 {
    type Assoc = i32;
}

impl Test for String {
    type Assoc = String;
}

fn main() {
    let mut x = Default::default();
    x = transform(x);
    x = 1i32;
}