nmandery/h3ron

Rust 1.53+ warns about undefined behavior in bindgen-generated code

nmandery opened this issue · 0 comments

This is tracked in this upstream bindgen issue: rust-lang/rust-bindgen#1651

Example:

warning: dereferencing a null pointer
  --> /home/.../h3ron/target/debug/build/h3ron-h3-sys-b89be661850ddf33/out/bindings.rs:31:19
   |
31 |         unsafe { &(*(::std::ptr::null::<GeoCoord>())).lat as *const _ as usize },
   |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this code causes undefined behavior when executed
   |
   = note: `#[warn(deref_nullptr)]` on by default