From 59be7f9b7f48b4f410f4829d7553ab24eb9b5b17 Mon Sep 17 00:00:00 2001 From: Travis Cross Date: Thu, 28 Mar 2024 01:24:56 +0000 Subject: [PATCH] Add open question about Rust 2015 and Rust 2018 In RFC 3101 we reserved in Rust 2021 prefixed identifiers such as `prefix#ident`. For this reason, we can make `gen` blocks available in Rust 2021 using `k#gen` as was anticipated in the (currently pending) RFC 3098. It's less clear what to do about Rust 2015 and Rust 2018, however, so let's mark this as an open question. (Thanks to tmandry for raising this point.) --- text/3513-gen-blocks.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/text/3513-gen-blocks.md b/text/3513-gen-blocks.md index e31aed65..c5fd0d02 100644 --- a/text/3513-gen-blocks.md +++ b/text/3513-gen-blocks.md @@ -134,7 +134,7 @@ gen { ## New keyword -In the 2024 edition we reserve `gen` as a keyword. Previous editions will use `k#gen` to get the same features. +In the 2024 edition we reserve `gen` as a keyword. Rust 2021 will use `k#gen` to access the same feature. What to do about earlier editions is left as an open question. ## Error handling @@ -619,6 +619,15 @@ Should we try to compute a conservative `size_hint`? This will reveal informatio Is there a possibility for implementing traits like `DoubleEndedIterator`, `ExactSizeIterator` at all? +## What to do about Rust 2015 and Rust 2018 + +In [RFC 3101][] we reserved prefixed identifiers such as `prefix#ident`. For this reason, we can make `gen` blocks available in Rust 2021 using `k#gen` as was anticipated in the (currently pending) [RFC 3098][]. + +Whether and how to make this feature available in Rust 2015 and Rust 2018, however, we leave as an open question. + +[RFC 3098]: https://github.com/rust-lang/rfcs/pull/3098 +[RFC 3101]: https://github.com/rust-lang/rfcs/pull/3101 + # Future possibilities [future-possibilities]: #future-possibilities