about summary refs log tree commit diff
path: root/compiler/rustc_index
diff options
context:
space:
mode:
authorCamille Gillot <gillot.camille@gmail.com>2025-08-18 22:53:14 +0000
committerCamille Gillot <gillot.camille@gmail.com>2025-09-07 16:35:30 +0000
commitb9262bce67f6d924d17632bf5539e4745e7b3a29 (patch)
tree0995cccc742d86e05f846b9fd3eacc3a192bd90f /compiler/rustc_index
parent9b8a719ae48db491a5f18d52fdbb802508bf75a5 (diff)
downloadrust-b9262bce67f6d924d17632bf5539e4745e7b3a29.tar.gz
rust-b9262bce67f6d924d17632bf5539e4745e7b3a29.zip
Use regular MaybeLiveLocals.
Diffstat (limited to 'compiler/rustc_index')
-rw-r--r--compiler/rustc_index/src/interval.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_index/src/interval.rs b/compiler/rustc_index/src/interval.rs
index 69a7a69610e..e81e7e2bc44 100644
--- a/compiler/rustc_index/src/interval.rs
+++ b/compiler/rustc_index/src/interval.rs
@@ -146,8 +146,11 @@ impl<I: Idx> IntervalSet<I> {
         let point = point.index() as u32;
 
         if let Some((first_start, _)) = self.map.first_mut() {
-            assert!(point < *first_start);
-            if point + 1 == *first_start {
+            assert!(point <= *first_start);
+            if point == *first_start {
+                // The point is already present in the set.
+            } else if point + 1 == *first_start {
+                // Just extend the first range.
                 *first_start = point;
             } else {
                 self.map.insert(0, (point, point));