Implement feature gate logic

This commit is contained in:
Nadrieril 2024-01-18 19:22:44 +01:00
parent 886108b9fe
commit 95a14d43d7
7 changed files with 806 additions and 158 deletions

View file

@ -95,6 +95,7 @@ pub trait TypeCx: Sized + fmt::Debug {
type PatData: Clone;
fn is_exhaustive_patterns_feature_on(&self) -> bool;
fn is_min_exhaustive_patterns_feature_on(&self) -> bool;
/// The number of fields for this constructor.
fn ctor_arity(&self, ctor: &Constructor<Self>, ty: &Self::Ty) -> usize;