make non-PartialEq-typed consts as patterns a hard error
This commit is contained in:
parent
e9f9594913
commit
5b7786cd1d
8 changed files with 27 additions and 112 deletions
|
@ -767,6 +767,14 @@ pub struct TypeNotStructural<'tcx> {
|
|||
pub non_sm_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(mir_build_non_partial_eq_match)]
|
||||
pub struct TypeNotPartialEq<'tcx> {
|
||||
#[primary_span]
|
||||
pub span: Span,
|
||||
pub non_peq_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(mir_build_invalid_pattern)]
|
||||
pub struct InvalidPattern<'tcx> {
|
||||
|
@ -822,12 +830,6 @@ pub struct NontrivialStructuralMatch<'tcx> {
|
|||
pub non_sm_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(mir_build_non_partial_eq_match)]
|
||||
pub struct NonPartialEqMatch<'tcx> {
|
||||
pub non_peq_ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(mir_build_pattern_not_covered, code = E0005)]
|
||||
pub(crate) struct PatternNotCovered<'s, 'tcx> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue