-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
--> src/spi.rs:230:12
|
230 | unsafe { core::ptr::write_volatile(&self.dev.dr as *const _ as *mut u8, data) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
= note: even for types with interior mutability, the only legal way to obtain a mutable pointer from a shared reference is through `UnsafeCell::get`
= note: `#[deny(invalid_reference_casting)]` on by default
error: could not compile `neotron-bmc-pico` (lib) due to 1 previous error
Seen in #72
Metadata
Metadata
Assignees
Labels
No labels