<!-- NOTE: For library features, please use the "Library Tracking Issue" template instead. Thank you for creating a tracking issue! 📜 Tracking issues are for tracking a feature from implementation to stabilisation. Make sure to include the relevant RFC for the feature if it has one. Otherwise provide a short summary of the feature and link any relevant PRs or issues, and remove any sections that are not relevant to the feature. Remember to add team labels to the tracking issue. For a language team feature, this would e.g., be `T-lang`. Such a feature should also be labeled with e.g., `F-my_feature`. This label is used to associate issues (e.g., bugs and design questions) to the feature. --> * This is a tracking issue for the RFC "static async fn in traits" (rust-lang/rfcs#3185) and "Return position `impl Trait` in traits" (rust-lang/rfcs#3425). * The feature gate for async fn in traits is `#![feature(async_fn_in_trait)]`. * The feature gate for return position `impl Trait` in traits is `#![feature(return_position_impl_trait_in_trait)]`. * This feature is developed as part of the [async fundamentals initiative](https://rust-lang.github.io/async-fundamentals-initiative/) -- see that website for more information! ### 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 <!-- Include each step required to complete the feature. Typically this is a PR implementing a feature, followed by a PR that stabilises the feature. However for larger features an implementation could be broken up into multiple PRs. --> - [x] Implement the RFC - [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide]) - [x] Stabilization PR: #115822 [stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr [doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs ### Unresolved Questions #### Async fn in trait - [x] https://github.com/rust-lang/rust/issues/103854 #### Return position impl Trait in trait - [ ] Should we stabilize this feature together with `async fn` to mitigate hazards of writing a trait that is not forwards-compatible with its desugaring? - [ ] Resolution of #112194 - Note that this might impact the desugaring, as described in [this comment](https://github.com/rust-lang/rfcs/pull/3425#issuecomment-1580917997). - [ ] Should we limit the legal positions for `impl Trait` to positions that are nameable using upcoming features like return-type notation (RTN)? (See [this comment](https://github.com/rust-lang/rfcs/pull/3425#pullrequestreview-1467880633) for an example.) ### Implementation history <!-- Include a list of all the PRs that were involved in implementing the feature. --> #### Async fn in trait https://github.com/rust-lang/rust/labels/F-async_fn_in_trait - https://github.com/rust-lang/rust/pull/102244 - #100734 #### Return position impl Trait in trait https://github.com/rust-lang/rust/labels/F-return_position_impl_trait_in_trait Several of these include code specific to async fn in trait. - https://github.com/rust-lang/rust/pull/101224 - #101614 - #101615 - #101676 - #101679 - #102152 - #102161 - #102164 - #102597 - #102334 - #103355 <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->