You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Disallow references to the Fn* traits using angle bracket notation
Disallow user impls of the Fn* traits
Disallow direct calls to foo.call()
Disallow parenthetical notation (Foo(A,B) -> C) from being used with anything other than the Fn* traits
In short, we permit unboxed closures to be used as if they are a language builtin, but disallow (for now) a lot of the more generic uses. We should be able to drop this feature gate shortly after 1.0.
We do not expect to completely "unfeature-gate" unboxed closures for 1.0. We wish to reserve the flexibility to change a few aspects:
AandRarguments from input types to (possibly) associated types. (cc Make return type of theFntraits an associated type #20871)To this end we will adjust the features to:
Fn*traits using angle bracket notationFn*traitsfoo.call()Foo(A,B) -> C) from being used with anything other than theFn*traitsIn short, we permit unboxed closures to be used as if they are a language builtin, but disallow (for now) a lot of the more generic uses. We should be able to drop this feature gate shortly after 1.0.
cc @pcwalton