You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is caused by the fact that the r that is passed to use_mut is a two-phase borrow. Miri treats two-phase borrows like raw pointers -- with the current version of Stacked Borrows, we cannot really do much better. Hopefully a future version of Stacked Borrows can restrict two-phase borrows better.
If you use use_mut(&mut *r) instead of use_mut(r), "real" reborrows happen and you get the expected error.
I think that this code contains UB:
But when running under Miri, no errors are produced.
The text was updated successfully, but these errors were encountered: