3 ms·
No problem! It also does enable some other things too. For example, closures have a type that's not writable, so fn foo() -> impl Fn(i32) -> i32 { |x|
by steveklabnik 9y ago
No problem! It also does enable some other things too. For example, closures have a type that's not writable, so
fn foo() -> impl Fn(i32) -> i32 {
|x| x + 1
}
can be written, since closures implement the Fn trait, but there's no way to write the type directly.