about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/errors.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-20 16:36:35 -0400
committerMichael Goulet <michael@errs.io>2024-07-16 12:06:25 -0400
commitd0a1851ec2cf84bdb41bc4d788b3995a8463c543 (patch)
tree6b7333a6eb3800ad80d39cfb57080251d7e5db3d /compiler/rustc_parse/src/errors.rs
parenta91f7d72f12efcc00ecf71591f066c534d45ddf7 (diff)
downloadrust-d0a1851ec2cf84bdb41bc4d788b3995a8463c543.tar.gz
rust-d0a1851ec2cf84bdb41bc4d788b3995a8463c543.zip
Deny keyword lifetimes pre-expansion
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
-rw-r--r--compiler/rustc_parse/src/errors.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 092a2a10ab7..4222486034b 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -2010,6 +2010,21 @@ pub struct CannotBeRawIdent {
 }
 
 #[derive(Diagnostic)]
+#[diag(parse_keyword_lifetime)]
+pub struct KeywordLifetime {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_invalid_label)]
+pub struct InvalidLabel {
+    #[primary_span]
+    pub span: Span,
+    pub name: Symbol,
+}
+
+#[derive(Diagnostic)]
 #[diag(parse_cr_doc_comment)]
 pub struct CrDocComment {
     #[primary_span]