Abort analysis on type error

This commit is contained in:
Nadrieril 2024-01-01 23:54:20 +01:00
parent 07d5f19426
commit 4b2e8bc841
6 changed files with 67 additions and 11 deletions

View file

@ -77,7 +77,7 @@ pub trait TypeCx: Sized + fmt::Debug {
/// The set of all the constructors for `ty`.
///
/// This must follow the invariants of `ConstructorSet`
fn ctors_for_ty(&self, ty: Self::Ty) -> ConstructorSet<Self>;
fn ctors_for_ty(&self, ty: Self::Ty) -> Result<ConstructorSet<Self>, Self::Error>;
/// Best-effort `Debug` implementation.
fn debug_pat(f: &mut fmt::Formatter<'_>, pat: &DeconstructedPat<'_, Self>) -> fmt::Result;