]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | #![feature(type_alias_impl_trait)] |
2 | ||
3 | type X = impl Sized; | |
4 | ||
5 | trait Foo { | |
6 | type Bar: Iterator<Item = X>; | |
7 | } | |
8 | ||
9 | impl 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 | ||
14 | fn incoherent() { | |
15 | let f: X = 22_i32; | |
16 | } | |
17 | ||
18 | fn main() {} |