Rename Skip to PrivateUninhabited

This commit is contained in:
Nadrieril 2024-02-28 17:56:01 +01:00
parent 39441e4cdd
commit c918893b63
5 changed files with 38 additions and 33 deletions

View file

@ -82,9 +82,10 @@ use crate::usefulness::{compute_match_usefulness, ValidityConstraint};
pub trait Captures<'a> {}
impl<'a, T: ?Sized> Captures<'a> for T {}
/// `bool` newtype that indicates whether we should skip this field during analysis.
/// `bool` newtype that indicates whether this is a privately uninhabited field that we should skip
/// during analysis.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub struct SkipField(pub bool);
pub struct PrivateUninhabitedField(pub bool);
/// Context that provides type information about constructors.
///
@ -114,7 +115,7 @@ pub trait TypeCx: Sized + fmt::Debug {
&'a self,
ctor: &'a Constructor<Self>,
ty: &'a Self::Ty,
) -> impl Iterator<Item = (Self::Ty, SkipField)> + ExactSizeIterator + Captures<'a>;
) -> impl Iterator<Item = (Self::Ty, PrivateUninhabitedField)> + ExactSizeIterator + Captures<'a>;
/// The set of all the constructors for `ty`.
///