summaryrefslogtreecommitdiffstats
path: root/tests/ui/traits/next-solver/coerce-ambig-alias-to-rigid-alias.rs
blob: bcb48b5acc74d14b1d2c823f3c5d2a8f96d43cbc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// compile-flags: -Znext-solver
// check-pass

trait Trait {
    type Assoc;
}

fn call<T: Trait>(_: <T as Trait>::Assoc, _: T) {}

fn foo<T: Trait>(rigid: <T as Trait>::Assoc, t: T) {
    // Check that we can coerce `<?0 as Trait>::Assoc` to `<T as Trait>::Assoc`.
    call::<_ /* ?0 */>(rigid, t);
}

fn main() {}