Explicitly reject negative and reservation drop impls

This commit is contained in:
Michael Goulet 2023-04-26 18:22:32 +00:00
parent 6ce22733b9
commit bd146c72ac
10 changed files with 74 additions and 28 deletions

View file

@ -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,
},
}