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

// test that the new solver can handle `alias-eq(<i32 as TraitB>::Assoc, u32)`

trait TraitA {}

trait TraitB {
    type Assoc;
}

impl<T: TraitB> TraitA for (T, T::Assoc) {}

impl TraitB for i32 {
    type Assoc = u32;
}

fn needs_a<T: TraitA>() {}

fn main() {
    needs_a::<(i32, u32)>();
}