diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-12-14 17:58:33 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:58:38 +0100 |
| commit | 8c5e89907c1f6312c8613b5d6851381bbcde8052 (patch) | |
| tree | 535a5541ca0ba76c60080f7be69b8349e5fb2c9f /compiler/rustc_pattern_analysis/src/constructor.rs | |
| parent | e10b1657758e39668c0fd93c9a0d3f32d0a7c0a7 (diff) | |
| download | rust-8c5e89907c1f6312c8613b5d6851381bbcde8052.tar.gz rust-8c5e89907c1f6312c8613b5d6851381bbcde8052.zip | |
Address review comments
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/constructor.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index 65312228801..2093c511032 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -266,8 +266,7 @@ pub struct IntRange { impl IntRange { /// Best effort; will not know that e.g. `255u8..` is a singleton. - #[cfg_attr(not(feature = "rustc"), allow(dead_code))] - pub(crate) fn is_singleton(&self) -> bool { + pub fn is_singleton(&self) -> bool { // Since `lo` and `hi` can't be the same `Infinity` and `plus_one` never changes from finite // to infinite, this correctly only detects ranges that contain exacly one `Finite(x)`. self.lo.plus_one() == self.hi |
