diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-11-27 04:08:09 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-03 12:25:46 +0100 |
| commit | 70deb9a57f4c5757162f4c845ee9fe318717064f (patch) | |
| tree | fc2a4b840aee4e2e43e38c20ecc740c271878861 /compiler/rustc_ast_lowering/src/errors.rs | |
| parent | 06a8ed10b627d04c9e91c41064c38745374acc71 (diff) | |
| download | rust-70deb9a57f4c5757162f4c845ee9fe318717064f.tar.gz rust-70deb9a57f4c5757162f4c845ee9fe318717064f.zip | |
Disallow arm bodies on never patterns
Diffstat (limited to 'compiler/rustc_ast_lowering/src/errors.rs')
| -rw-r--r-- | compiler/rustc_ast_lowering/src/errors.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/rustc_ast_lowering/src/errors.rs b/compiler/rustc_ast_lowering/src/errors.rs index c6a4166f537..11bb559719b 100644 --- a/compiler/rustc_ast_lowering/src/errors.rs +++ b/compiler/rustc_ast_lowering/src/errors.rs @@ -350,6 +350,15 @@ pub struct MatchArmWithNoBody { } #[derive(Diagnostic)] +#[diag(ast_lowering_never_pattern_with_body)] +pub struct NeverPatternWithBody { + #[primary_span] + #[label] + #[suggestion(code = "", applicability = "maybe-incorrect")] + pub span: Span, +} + +#[derive(Diagnostic)] #[diag(ast_lowering_never_pattern_with_guard)] pub struct NeverPatternWithGuard { #[primary_span] |
