Skip to content

Commit

Permalink
comment on mut-to-shr transmutes
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Nov 3, 2018
1 parent 8ac5d98 commit cb691b7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stacked_borrows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ impl<'a, 'mir, 'tcx> EvalContextExt<'tcx> for super::MiriEvalContext<'a, 'mir, '
// also using `var`, and that would be okay.
}
(UsageKind::Read, Borrow::Mut(Mut::Uniq(_))) => {
// A mut got transmuted to shr. The mut borrow must be reactivatable.
// A mut got transmuted to shr. Can happen even from compiler transformations:
// `&*x` gets optimized to `x` even when `x` is a `&mut`.
}
(UsageKind::Write, Borrow::Frz(_)) => {
// This is just invalid.
Expand Down

0 comments on commit cb691b7

Please sign in to comment.