Skip to content

Commit f1ef1e3

Browse files
committed
Remove gen keyword.
This is blocking testing.
1 parent b47b918 commit f1ef1e3

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

compiler/rustc_parse/src/parser/expr.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1519,15 +1519,15 @@ impl<'a> Parser<'a> {
15191519
Ok(this.mk_expr(this.prev_token.span, ExprKind::Underscore))
15201520
} else if this.token.uninterpolated_span().at_least_rust_2018() {
15211521
// `Span::at_least_rust_2018()` is somewhat expensive; don't get it repeatedly.
1522-
if this.token.uninterpolated_span().at_least_rust_2024()
1523-
// check for `gen {}` and `gen move {}`
1524-
// or `async gen {}` and `async gen move {}`
1525-
&& (this.is_gen_block(kw::Gen, 0)
1526-
|| (this.check_keyword(kw::Async) && this.is_gen_block(kw::Gen, 1)))
1527-
{
1528-
// FIXME: (async) gen closures aren't yet parsed.
1529-
this.parse_gen_block()
1530-
} else if this.check_keyword(kw::Async) {
1522+
// if this.token.uninterpolated_span().at_least_rust_2024()
1523+
// // check for `gen {}` and `gen move {}`
1524+
// // or `async gen {}` and `async gen move {}`
1525+
// && (this.is_gen_block(kw::Gen, 0)
1526+
// || (this.check_keyword(kw::Async) && this.is_gen_block(kw::Gen, 1)))
1527+
// {
1528+
// // FIXME: (async) gen closures aren't yet parsed.
1529+
// this.parse_gen_block()
1530+
if this.check_keyword(kw::Async) {
15311531
// FIXME(gen_blocks): Parse `gen async` and suggest swap
15321532
if this.is_gen_block(kw::Async, 0) {
15331533
// Check for `async {` and `async move {`,

compiler/rustc_parse/src/parser/mod.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1202,14 +1202,14 @@ impl<'a> Parser<'a> {
12021202
return_impl_trait_id: DUMMY_NODE_ID,
12031203
})
12041204
}
1205-
} else if self.token.uninterpolated_span().at_least_rust_2024()
1206-
&& self.eat_keyword_case(kw::Gen, case)
1207-
{
1208-
Some(CoroutineKind::Gen {
1209-
span,
1210-
closure_id: DUMMY_NODE_ID,
1211-
return_impl_trait_id: DUMMY_NODE_ID,
1212-
})
1205+
// } else if self.token.uninterpolated_span().at_least_rust_2024()
1206+
// && self.eat_keyword_case(kw::Gen, case)
1207+
// {
1208+
// Some(CoroutineKind::Gen {
1209+
// span,
1210+
// closure_id: DUMMY_NODE_ID,
1211+
// return_impl_trait_id: DUMMY_NODE_ID,
1212+
// })
12131213
} else {
12141214
None
12151215
}

compiler/rustc_span/src/symbol.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2380,7 +2380,7 @@ impl Symbol {
23802380

23812381
fn is_unused_keyword_conditional(self, edition: impl Copy + FnOnce() -> Edition) -> bool {
23822382
self == kw::Try && edition().at_least_rust_2018()
2383-
|| self == kw::Gen && edition().at_least_rust_2024()
2383+
// || self == kw::Gen && edition().at_least_rust_2024()
23842384
}
23852385

23862386
pub fn is_reserved(self, edition: impl Copy + FnOnce() -> Edition) -> bool {

0 commit comments

Comments
 (0)