This is a tracking issue for impl Trait as output type in Fn traits in return position of functions, for example fn f() -> impl Fn() -> impl Sized { ... }.
The feature gate for the issue is #![feature(impl_trait_in_fn_trait_return)].
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Unresolved Questions
Questions to be answered in stabilization report (after gaining experience).
Should we allow impl Fn() -> impl Trait in argument position of functions?
fn f(into_iter_fn: impl Fn() -> impl Iterator) {}
...and what does that desugar to? See discussion here.
Behavior of '_
What is the behavior of '_ in impl trait in general and in this specific case? In this particular case, '_ should be consistent with its use in other function signatures.
Parsing rules
Let's document the parsing behavior and assure ourselves we are happy with it. Some notes here.
Implementation history
This is a tracking issue for
impl Traitas output type inFntraits in return position of functions, for examplefn f() -> impl Fn() -> impl Sized { ... }.The feature gate for the issue is
#![feature(impl_trait_in_fn_trait_return)].About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
impl Fn() -> impl Traitin return position #93582)Unresolved Questions
Questions to be answered in stabilization report (after gaining experience).
Should we allow
impl Fn() -> impl Traitin argument position of functions?...and what does that desugar to? See discussion here.
Behavior of
'_What is the behavior of
'_in impl trait in general and in this specific case? In this particular case,'_should be consistent with its use in other function signatures.Parsing rules
Let's document the parsing behavior and assure ourselves we are happy with it. Some notes here.
Implementation history
impl Fn() -> impl Traitin return position #93582