Skip to content

Commit

Permalink
Update compiler/rustc_const_eval/src/interpret/step.rs
Browse files Browse the repository at this point in the history
Co-authored-by: Ralf Jung <post@ralfj.de>
  • Loading branch information
scottmcm and RalfJung authored Dec 13, 2024
1 parent 38249be commit d2a98f7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion compiler/rustc_const_eval/src/interpret/step.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ impl<'tcx, M: Machine<'tcx>> InterpCx<'tcx, M> {
&& span.desugaring_kind() != Some(DesugaringKind::IndexBoundsCheckReborrow)
{
// If this was not already raw, it needs retagging.
// Unless it's the `PtrMetadata(&raw const *_n)` from indexing.
// As a special hack, we exclude the desugared `PtrMetadata(&raw const *_n)`
// from indexing. (Really we should not do any retag on `&raw` but that does not
// currently work with Stacked Borrows.)
val = M::retag_ptr_value(self, mir::RetagKind::Raw, &val)?;
}
self.write_immediate(*val, &dest)?;
Expand Down

0 comments on commit d2a98f7

Please sign in to comment.