3 ms·
> There is experimental support in Rust for the latter It's not really experimental. You've linked the underlying core intrinsic, but the stabilised interface,
by tialaramex 5y ago
> There is experimental support in Rust for the latter
It's not really experimental. You've linked the underlying core intrinsic, but the stabilised interface, which is what programmers should actually use, is std::ptr::write_volatile / std::ptr::read_volatile
Essentially you linked an implementation detail and that's why it's labelled unstable and you can't use it in stable Rust.
- exDM69 5y agoI see, thanks for the clarification. My search engine pointed me to the std::intrinsics as first hit. But yeah, you can have your volatile in Rust then. It's not a type level annotation, but an explicit (unsafe) operation.