-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking Issue for impl Trait as output type of Fn traits in function return position #99697
Copy link
Copy link
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-impl_trait_in_fn_trait_return`#![feature(impl_trait_in_fn_trait_return)]``#![feature(impl_trait_in_fn_trait_return)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-impl_trait_in_fn_trait_return`#![feature(impl_trait_in_fn_trait_return)]``#![feature(impl_trait_in_fn_trait_return)]`S-tracking-impl-incompleteStatus: The implementation is incomplete.Status: The implementation is incomplete.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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