about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/messages.ftl
diff options
context:
space:
mode:
authorNadrieril <nadrieril+git@gmail.com>2023-11-27 01:53:05 +0100
committerNadrieril <nadrieril+git@gmail.com>2023-12-03 12:25:46 +0100
commita2dcb3a6d9aead3964b3b1cdf814dc7eb9c5d8ed (patch)
tree6dface89197039eb8fddb71508a4522ac0892eca /compiler/rustc_ast_lowering/messages.ftl
parent0bfebc6105ea882d7048057718b2e34d09a5d17e (diff)
downloadrust-a2dcb3a6d9aead3964b3b1cdf814dc7eb9c5d8ed.tar.gz
rust-a2dcb3a6d9aead3964b3b1cdf814dc7eb9c5d8ed.zip
Disallow an arm without a body (except for never patterns)
Parsing now accepts a match arm without a body, so we must make sure to
only accept that if the pattern is a never pattern.
Diffstat (limited to 'compiler/rustc_ast_lowering/messages.ftl')
-rw-r--r--compiler/rustc_ast_lowering/messages.ftl4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/messages.ftl b/compiler/rustc_ast_lowering/messages.ftl
index 91591a71611..2a519b418e6 100644
--- a/compiler/rustc_ast_lowering/messages.ftl
+++ b/compiler/rustc_ast_lowering/messages.ftl
@@ -91,6 +91,10 @@ ast_lowering_invalid_register =
 ast_lowering_invalid_register_class =
     invalid register class `{$reg_class}`: {$error}
 
+ast_lowering_match_arm_with_no_body =
+    `match` arm with no body
+    .suggestion = add a body after the pattern
+
 ast_lowering_misplaced_assoc_ty_binding =
     associated type bounds are only allowed in where clauses and function signatures, not in {$position}