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
The constructors for VolatilePtr and VolatileRef require the passed pointer to be valid. I am guessing that this is because Rust historically only allowed volatile accesses through valid pointers. Since 1.90, volatile accesses can be performed on pointers that are not valid (with some restrictions) PR, changelog, docs. If there is no longer a reason to have these restrictions, it would be nice to drop them.
Interesting! It seems we can relax the requirement then by changing the pointer types from NonNull<T> to *mut T and changing the safety requirements to mention validity for volatile operations only. Feel free to submit a PR. :)
Activity
mkroening commentedon Mar 27, 2026
Interesting! It seems we can relax the requirement then by changing the pointer types from
NonNull<T>to*mut Tand changing the safety requirements to mention validity for volatile operations only. Feel free to submit a PR. :)