From c104f3b629cfcac35802a899478756abf24ee7c1 Mon Sep 17 00:00:00 2001 From: Eric Holk Date: Wed, 29 Nov 2023 12:07:43 -0800 Subject: Lower return types for gen fn to impl Iterator --- compiler/rustc_parse/src/parser/item.rs | 4 ---- 1 file changed, 4 deletions(-) (limited to 'compiler/rustc_parse/src/parser') diff --git a/compiler/rustc_parse/src/parser/item.rs b/compiler/rustc_parse/src/parser/item.rs index 55f7310681f..4f01ab02c04 100644 --- a/compiler/rustc_parse/src/parser/item.rs +++ b/compiler/rustc_parse/src/parser/item.rs @@ -2410,10 +2410,6 @@ impl<'a> Parser<'a> { } } - if let Gen::Yes { span, .. } = genness { - self.sess.emit_err(errors::GenFn { span }); - } - if !self.eat_keyword_case(kw::Fn, case) { // It is possible for `expect_one_of` to recover given the contents of // `self.expected_tokens`, therefore, do not use `self.unexpected()` which doesn't -- cgit 1.4.1-3-g733a5