diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-02-18 14:16:57 +0100 |
|---|---|---|
| committer | Folkert de Vries <folkert@folkertdev.nl> | 2025-06-23 20:43:04 +0200 |
| commit | ba5556d239c11232dc8d95123ea70a2783019476 (patch) | |
| tree | 0fc9a5eb5964d18de0ab43107b5964818f8bb49f /compiler/rustc_pattern_analysis | |
| parent | 42245d34d22ade32b3f276dcf74deb826841594c (diff) | |
| download | rust-ba5556d239c11232dc8d95123ea70a2783019476.tar.gz rust-ba5556d239c11232dc8d95123ea70a2783019476.zip | |
Add `#[loop_match]` for improved DFA codegen
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
Diffstat (limited to 'compiler/rustc_pattern_analysis')
| -rw-r--r-- | compiler/rustc_pattern_analysis/src/constructor.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_pattern_analysis/src/constructor.rs b/compiler/rustc_pattern_analysis/src/constructor.rs index f7a4931c111..09685640e50 100644 --- a/compiler/rustc_pattern_analysis/src/constructor.rs +++ b/compiler/rustc_pattern_analysis/src/constructor.rs @@ -314,7 +314,8 @@ impl IntRange { IntRange { lo, hi } } - fn is_subrange(&self, other: &Self) -> bool { + #[inline] + pub fn is_subrange(&self, other: &Self) -> bool { other.lo <= self.lo && self.hi <= other.hi } |
