summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/new-solver/canonical-int-var-eq-in-response.rs
blob: 4b013983a4a84fa3f951395058478ba3878024ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// compile-flags: -Ztrait-solver=next
// check-pass

trait Mirror {
    type Assoc;
}

impl<T> Mirror for T {
    type Assoc = T;
}

trait Test {}
impl Test for i64 {}
impl Test for u64 {}

fn mirror_me<T: Mirror>(t: T, s: <T as Mirror>::Assoc) where <T as Mirror>::Assoc: Test {}

fn main() {
    let mut x = 0;
    mirror_me(x, 1);
    x = 1i64;
}