about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-05 11:30:55 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-10-26 06:49:17 +0000
commita61cf673cd10ed24394c3403e03d8f7cf1f50170 (patch)
treedbf3c9adb68cb079695fc7b2e6999f162aeb42dd /compiler/rustc_parse/src/errors.rs
parentccb160d3432dff025ab62696a82e576bf08aa006 (diff)
downloadrust-a61cf673cd10ed24394c3403e03d8f7cf1f50170.tar.gz
rust-a61cf673cd10ed24394c3403e03d8f7cf1f50170.zip
Reserve `gen` keyword for `gen {}` blocks and `gen fn` in 2024 edition
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index aeb4fd0a304..c0e94d15da0 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -521,6 +521,14 @@ pub(crate) struct CatchAfterTry {
 }
 
 #[derive(Diagnostic)]
+#[diag(parse_gen_block)]
+#[help]
+pub(crate) struct GenBlock {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
 #[diag(parse_comma_after_base_struct)]
 #[note]
 pub(crate) struct CommaAfterBaseStruct {