-
Couldn't load subscription status.
- Fork 13.9k
Closed
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)
Milestone
Description
We do not expect to completely "unfeature-gate" unboxed closures for 1.0. We wish to reserve the flexibility to change a few aspects:
- Move to variadic generics in place of auto-tupling.
- Change the
AandRarguments from input types to (possibly) associated types. (cc Make return type of theFntraits an associated type #20871) - Improve the coherence story with respect to fn-trait hierarchy. (cc Unable to manually implement FnOnce #18835)
To this end we will adjust the features to:
- 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 theFn*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.
cc @pcwalton
Metadata
Metadata
Assignees
Labels
A-closuresArea: Closures (`|…| { … }`)Area: Closures (`|…| { … }`)