gd32vf103xx-hal icon indicating copy to clipboard operation
gd32vf103xx-hal copied to clipboard

Build failure on new toolchain

Open ivq opened this issue 1 year ago • 0 comments

At least current stable toolchain(1.74.0) is complaining:

error: assigning to `&T` is undefined behavior, consider using an `UnsafeCell`
   --> /home/user/gd32vf103xx-hal/src/serial.rs:422:17
    |
422 |                 ptr::write_volatile(&(*USART::ptr()).data as *const _ as *mut _, byte)
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, visit <https://doc.rust-lang.org/book/ch15-05-interior-mutability.html>
    = note: `#[deny(invalid_reference_casting)]` on by default

This kind of compile errors seem start to exist in 1.73.0: https://github.com/rust-lang/rust/issues/116410

ivq avatar Nov 25 '23 14:11 ivq