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

#![feature(type_alias_impl_trait)]

// Similar to tests/ui/traits/new-solver/tait-eq-proj.rs
// but check the alias-sub relation in the other direction.

type Tait = impl Iterator<Item = impl Sized>;

fn mk<T>() -> T {
    todo!()
}

fn a(_: Tait) {
    let x: Tait = mk();
    let mut array = mk();
    let mut z = IntoIterator::into_iter(array);
    z = x;
    array = [0i32; 32];
}

fn main() {}