Skip to content

Build failure #73

@thejpster

Description

@thejpster
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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions