1 #![feature(type_alias_impl_trait)]
3 type Foo = impl for<'a> FnOnce(&'a str) -> usize;
4 type Bar = impl FnOnce(&'static str) -> usize;
8 |s| s.len() //~ ERROR type annotations needed
15 |s| s.len() //~ ERROR type annotations needed
21 fn foo2() -> impl for<'a> FnOnce(&'a str) -> usize {
23 |s| s.len() //~ ERROR type annotations needed
28 fn bar2() -> impl FnOnce(&'static str) -> usize {
30 |s| s.len() //~ ERROR type annotations needed