1 #![feature(type_alias_impl_trait)]
3 type FooArg<'a> = &'a dyn ToString;
4 type FooRet = impl std::fmt::Debug;
6 type FooItem = Box<dyn Fn(FooArg) -> FooRet>;
7 type Foo = impl Iterator<Item = FooItem>;
12 impl Iterator for Bar {
15 fn next(&mut self) -> Option<Self::Item> {
20 fn quux(st: FooArg) -> FooRet {
28 fn oof() -> impl std::fmt::Debug {
30 let func = bar.next().unwrap();
31 return func(&"oof"); //~ ERROR opaque type's hidden type cannot be another opaque type