diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2025-07-19 11:28:31 +0200 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2025-07-20 18:27:30 +0200 |
| commit | 2bb00741d463143a10e632bb118d4ed336dbb75f (patch) | |
| tree | 333eddf6f28aa6b988ff164ed82066f636633b06 /compiler/rustc_pattern_analysis/src/lib.rs | |
| parent | 81af9d45698a19183b8552079cbc7bf893fad1e5 (diff) | |
| download | rust-2bb00741d463143a10e632bb118d4ed336dbb75f.tar.gz rust-2bb00741d463143a10e632bb118d4ed336dbb75f.zip | |
pattern_analysis: add option to get a full set of witnesses
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/lib.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_pattern_analysis/src/lib.rs b/compiler/rustc_pattern_analysis/src/lib.rs index 66df35f9ee4..d9bb93a829b 100644 --- a/compiler/rustc_pattern_analysis/src/lib.rs +++ b/compiler/rustc_pattern_analysis/src/lib.rs @@ -57,6 +57,13 @@ pub trait PatCx: Sized + fmt::Debug { fn is_exhaustive_patterns_feature_on(&self) -> bool; + /// Whether to ensure the non-exhaustiveness witnesses we report for a complete set. This is + /// `false` by default to avoid some exponential blowup cases such as + /// <https://github.com/rust-lang/rust/issues/118437>. + fn exhaustive_witnesses(&self) -> bool { + false + } + /// The number of fields for this constructor. fn ctor_arity(&self, ctor: &Constructor<Self>, ty: &Self::Ty) -> usize; |
