2023-05-27 14:27:59 -05:00
|
|
|
// 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>;
|
|
|
|
|
2023-06-15 04:41:14 -05:00
|
|
|
fn mk<T>() -> T {
|
|
|
|
todo!()
|
|
|
|
}
|
2023-05-27 14:27:59 -05:00
|
|
|
|
2023-06-15 04:41:14 -05:00
|
|
|
fn a(_: Tait) {
|
2023-05-27 14:27:59 -05:00
|
|
|
let x: Tait = mk();
|
|
|
|
let mut array = mk();
|
|
|
|
let mut z = IntoIterator::into_iter(array);
|
|
|
|
z = x;
|
|
|
|
array = [0i32; 32];
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|