Typecheck never patterns
This commit is contained in:
parent
a947c4c2c3
commit
d8b72e796e
6 changed files with 110 additions and 7 deletions
|
@ -788,6 +788,16 @@ pub struct FloatPattern;
|
|||
#[diag(mir_build_pointer_pattern)]
|
||||
pub struct PointerPattern;
|
||||
|
||||
#[derive(Diagnostic)]
|
||||
#[diag(mir_build_non_empty_never_pattern)]
|
||||
#[note]
|
||||
pub struct NonEmptyNeverPattern<'tcx> {
|
||||
#[primary_span]
|
||||
#[label]
|
||||
pub span: Span,
|
||||
pub ty: Ty<'tcx>,
|
||||
}
|
||||
|
||||
#[derive(LintDiagnostic)]
|
||||
#[diag(mir_build_indirect_structural_match)]
|
||||
#[note(mir_build_type_not_structural_tip)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue