1
Fork 0

Don't retag the PtrMetadata(&raw const *_n) in slice indexing

This commit is contained in:
Scott McMurray 2024-12-13 02:00:20 -08:00
parent 612adbb6bf
commit 38249be509
5 changed files with 29 additions and 9 deletions

View file

@ -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",
}
}
}