]> git.proxmox.com Git - rustc.git/blame - src/test/ui/type-alias-impl-trait/issue-57961.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / src / test / ui / type-alias-impl-trait / issue-57961.rs
CommitLineData
064997fb
FG
1#![feature(type_alias_impl_trait)]
2
3type X = impl Sized;
4
5trait Foo {
6 type Bar: Iterator<Item = X>;
7}
8
9impl Foo for () {
10 type Bar = std::vec::IntoIter<u32>;
f2b60f7d 11 //~^ ERROR expected `std::vec::IntoIter<u32>` to be an iterator that yields `X`, but it yields `u32`
064997fb
FG
12}
13
14fn incoherent() {
15 let f: X = 22_i32;
16}
17
18fn main() {}