tock / libtock-rs

Rust userland library for Tock
Apache License 2.0
168 stars 109 forks source link

Register: document provenance, fix conversion implementations. #563

Open jrvanwhy opened 2 weeks ago

jrvanwhy commented 2 weeks ago

Now that the presence of provenance in Rust has been stabilized, we should document the effect that Register has on pointer provenance. Note that the current implementation sometimes attaches provenance when we don't want it to, which we can only fix when strict provenance is stabilized (which should happen in Rust 1.84).

This also fixes the implementation of From<usize> for Register, which relies on transmuting a usize to a pointer, which is not a stable guarantee, and makes a few other style improvements.