diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2024-02-28 17:56:01 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2024-02-28 17:56:01 +0100 |
| commit | c918893b63022c1d810a71e8b7fa211b6aecd782 (patch) | |
| tree | f7afb94e6484fd7c6721eb415a8f114d99f9505f /compiler/rustc_pattern_analysis/src/lib.rs | |
| parent | 39441e4cdd46c61be6b86e4bfe352d1e7d5af6fb (diff) | |
| download | rust-c918893b63022c1d810a71e8b7fa211b6aecd782.tar.gz rust-c918893b63022c1d810a71e8b7fa211b6aecd782.zip | |
Rename `Skip` to `PrivateUninhabited`
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lib.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lib.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs index e58e322a70d..d4b38d260e7 100644 --- a/compiler/rustc_pattern_analysis/src/lib.rs +++ b/compiler/rustc_pattern_analysis/src/lib.rs @@ -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`. /// |
