diff options
| author | Nadrieril <nadrieril+git@gmail.com> | 2023-12-11 20:46:35 +0100 |
|---|---|---|
| committer | Nadrieril <nadrieril+git@gmail.com> | 2023-12-15 16:58:37 +0100 |
| commit | 16bd6ac3ed3e63cd6f2464b54026dbeb90ba6bbe (patch) | |
| tree | 72ee0a128439ca447912eada407deb1ecc495dd9 /compiler/rustc_pattern_analysis/src/constructor.rs | |
| parent | 42f43938248d1272c0b3edc85385bde322a9c7fc (diff) | |
| download | rust-16bd6ac3ed3e63cd6f2464b54026dbeb90ba6bbe.tar.gz rust-16bd6ac3ed3e63cd6f2464b54026dbeb90ba6bbe.zip | |
Gate rustc-specific code under a feature
Diffstat (limited to 'compiler/rustc_pattern_analysis/src/constructor.rs')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/constructor.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index d7e216ddbc5..a3af4eb6d21 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -266,6 +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 { // 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)`. |
