rust/tests/ui/traits/next-solver/tait-eq-proj-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
447 B
Rust
Raw Normal View History

2023-12-14 13:11:28 +01:00
// compile-flags: -Znext-solver
// check-pass
#![feature(type_alias_impl_trait)]
// Similar to tests/ui/traits/next-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() {}