diff options
| author | mejrs <> | 2022-12-20 21:24:18 +0100 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2023-01-11 14:39:59 -0800 |
| commit | ef3307289056ac3151a1a6eb29065932e5326bcf (patch) | |
| tree | b484749203f3f330fc506196b362a15ac9e213c0 /compiler/rustc_mir_build/src/errors.rs | |
| parent | 5d2b9a9ed09ac8a4cb4b7977cdc513fe1cf56408 (diff) | |
| download | rust-ef3307289056ac3151a1a6eb29065932e5326bcf.tar.gz rust-ef3307289056ac3151a1a6eb29065932e5326bcf.zip | |
Migrate usefulness.rs
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
| -rw-r--r-- | compiler/rustc_mir_build/src/errors.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/rustc_mir_build/src/errors.rs b/compiler/rustc_mir_build/src/errors.rs index 6bb15730b00..e15da5bb9ce 100644 --- a/compiler/rustc_mir_build/src/errors.rs +++ b/compiler/rustc_mir_build/src/errors.rs @@ -685,3 +685,17 @@ pub struct Overlap<'tcx> { pub span: Span, pub range: Pat<'tcx>, } + +#[derive(LintDiagnostic)] +#[diag(mir_build_non_exhaustive_omitted_pattern)] +#[help] +#[note] +pub(crate) struct NonExhaustiveOmittedPattern<'tcx> { + pub scrut_ty: Ty<'tcx>, + #[label] + pub uncovered: Span, + pub count: usize, + pub witness_1: Pat<'tcx>, + pub witness_2: Pat<'tcx>, + pub witness_3: Pat<'tcx>, +} |
