Skip to content

Commit 9ae1860

Browse files
committed
Auto merge of #122960 - ehuss:edition-2024-crater-test, r=<try>
Crater 2024 edition test
2 parents 35936c4 + f1ef1e3 commit 9ae1860

File tree

5 files changed

+21
-20
lines changed

5 files changed

+21
-20
lines changed

.gitmodules

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
shallow = true
55
[submodule "src/tools/cargo"]
66
path = src/tools/cargo
7-
url = https://github.com/rust-lang/cargo.git
7+
url = https://github.com/ehuss/cargo.git
8+
branch = "edition-2024-crater"
89
shallow = true
910
[submodule "src/doc/reference"]
1011
path = src/doc/reference

compiler/rustc_parse/src/parser/expr.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -1521,15 +1521,15 @@ impl<'a> Parser<'a> {
15211521
Ok(this.mk_expr(this.prev_token.span, ExprKind::Underscore))
15221522
} else if this.token.uninterpolated_span().at_least_rust_2018() {
15231523
// `Span::at_least_rust_2018()` is somewhat expensive; don't get it repeatedly.
1524-
if this.token.uninterpolated_span().at_least_rust_2024()
1525-
// check for `gen {}` and `gen move {}`
1526-
// or `async gen {}` and `async gen move {}`
1527-
&& (this.is_gen_block(kw::Gen, 0)
1528-
|| (this.check_keyword(kw::Async) && this.is_gen_block(kw::Gen, 1)))
1529-
{
1530-
// FIXME: (async) gen closures aren't yet parsed.
1531-
this.parse_gen_block()
1532-
} else if this.check_keyword(kw::Async) {
1524+
// if this.token.uninterpolated_span().at_least_rust_2024()
1525+
// // check for `gen {}` and `gen move {}`
1526+
// // or `async gen {}` and `async gen move {}`
1527+
// && (this.is_gen_block(kw::Gen, 0)
1528+
// || (this.check_keyword(kw::Async) && this.is_gen_block(kw::Gen, 1)))
1529+
// {
1530+
// // FIXME: (async) gen closures aren't yet parsed.
1531+
// this.parse_gen_block()
1532+
if this.check_keyword(kw::Async) {
15331533
// FIXME(gen_blocks): Parse `gen async` and suggest swap
15341534
if this.is_gen_block(kw::Async, 0) {
15351535
// 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
@@ -2379,7 +2379,7 @@ impl Symbol {
23792379

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

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

0 commit comments

Comments
 (0)