diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-02-27 09:51:23 +0000 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2025-06-03 10:52:32 -0700 |
| commit | 5fbdfc3e1018072e0c272d19308d72ac5165f01a (patch) | |
| tree | b8b697529f74f05d2d0636f5387e600ed449b822 /compiler/rustc_parse/src/parser/stmt.rs | |
| parent | aae43c4532690153af7465227816c93036bb1604 (diff) | |
| download | rust-5fbdfc3e1018072e0c272d19308d72ac5165f01a.tar.gz rust-5fbdfc3e1018072e0c272d19308d72ac5165f01a.zip | |
Add `iter` macro
This adds an `iter!` macro that can be used to create movable generators. This also adds a yield_expr feature so the `yield` keyword can be used within iter! macro bodies. This was needed because several unstable features each need `yield` expressions, so this allows us to stabilize them separately from any individual feature. Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de> Co-authored-by: Jieyou Xu <jieyouxu@outlook.com> Co-authored-by: Travis Cross <tc@traviscross.com>
Diffstat (limited to 'compiler/rustc_parse/src/parser/stmt.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/stmt.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/stmt.rs b/compiler/rustc_parse/src/parser/stmt.rs index ccc3410674b..c37cb0881c3 100644 --- a/compiler/rustc_parse/src/parser/stmt.rs +++ b/compiler/rustc_parse/src/parser/stmt.rs @@ -713,7 +713,7 @@ impl<'a> Parser<'a> { /// Parses the rest of a block expression or function body. /// Precondition: already parsed the '{'. - pub(crate) fn parse_block_tail( + pub fn parse_block_tail( &mut self, lo: Span, s: BlockCheckMode, |
