1
Fork 0

Maintain a list of types permitted per pattern

This commit is contained in:
Oli Scherer 2025-01-28 12:07:36 +00:00
parent ded0836c18
commit 7e4ccc2f12
10 changed files with 211 additions and 2 deletions

View file

@ -1,4 +1,5 @@
use rustc_macros::Diagnostic;
use rustc_middle::ty::Ty;
use rustc_span::Span;
#[derive(Diagnostic)]
@ -7,3 +8,14 @@ pub(crate) struct WildPatTy {
#[primary_span]
pub span: Span,
}
#[derive(Diagnostic)]
#[diag(hir_analysis_invalid_base_type)]
pub(crate) struct InvalidBaseType<'tcx> {
pub ty: Ty<'tcx>,
#[primary_span]
pub ty_span: Span,
pub pat: &'static str,
#[note]
pub pat_span: Span,
}