about summary refs log tree commit diff
path: root/compiler/rustc_span
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-12-13 02:00:20 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2024-12-13 02:00:20 -0800
commit38249be509101e87ea4ac10951b1b4ce554f1cc0 (patch)
tree9e090fcb0ebad1290811af2cc560604c3cdbb80d /compiler/rustc_span
parent612adbb6bf88ecf549fb93cb1f4edcf793bca88e (diff)
Don't retag the `PtrMetadata(&raw const *_n)` in slice indexing
Diffstat (limited to 'compiler/rustc_span')
-rw-r--r--compiler/rustc_span/src/hygiene.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_span/src/hygiene.rs b/compiler/rustc_span/src/hygiene.rs
index a5826137181..3cdae437b7d 100644
--- a/compiler/rustc_span/src/hygiene.rs
+++ b/compiler/rustc_span/src/hygiene.rs
@@ -1163,6 +1163,9 @@ pub enum DesugaringKind {
     WhileLoop,
     /// `async Fn()` bound modifier
     BoundModifier,
+    /// Marks a `&raw const *_1` needed as part of getting the length of a mutable
+    /// slice for the bounds check, so that MIRI's retag handling can recognize it.
+    IndexBoundsCheckReborrow,
 }
 
 impl DesugaringKind {
@@ -1179,6 +1182,7 @@ impl DesugaringKind {
             DesugaringKind::ForLoop => "`for` loop",
             DesugaringKind::WhileLoop => "`while` loop",
             DesugaringKind::BoundModifier => "trait bound modifier",
+            DesugaringKind::IndexBoundsCheckReborrow => "slice indexing",
         }
     }
 }