diff options
| author | Michael Goulet <michael@errs.io> | 2023-04-26 18:22:32 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-04-27 17:02:17 +0000 |
| commit | bd146c72ac2faf6bbf189ad92d06e0bcd6cc92fc (patch) | |
| tree | 3dd93051ad801fdc2d4a61ee2944480f7c401772 /compiler/rustc_hir_analysis/src/errors.rs | |
| parent | 6ce22733b973355573efd1e6294e585460e90e17 (diff) | |
| download | rust-bd146c72ac2faf6bbf189ad92d06e0bcd6cc92fc.tar.gz rust-bd146c72ac2faf6bbf189ad92d06e0bcd6cc92fc.zip | |
Explicitly reject negative and reservation drop impls
Diffstat (limited to 'compiler/rustc_hir_analysis/src/errors.rs')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/errors.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/rustc_hir_analysis/src/errors.rs b/compiler/rustc_hir_analysis/src/errors.rs index f82169dee98..ba3039272f5 100644 --- a/compiler/rustc_hir_analysis/src/errors.rs +++ b/compiler/rustc_hir_analysis/src/errors.rs @@ -815,3 +815,17 @@ pub(crate) struct MissingTildeConst { #[primary_span] pub span: Span, } + +#[derive(Diagnostic)] +pub(crate) enum DropImplPolarity { + #[diag(hir_analysis_drop_impl_negative)] + Negative { + #[primary_span] + span: Span, + }, + #[diag(hir_analysis_drop_impl_reservation)] + Reservation { + #[primary_span] + span: Span, + }, +} |
