You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix offset_of assertions for fields of types with interior mutability.
Implementation of `memoffset::offset_of` (from the `memoffset` crate)
ends up taking a reference to a struct. In `const` contexts (such as
the context of the assertion) this runs into
rust-lang/rust#80384. This CL works around
this by opting the generated code into
`#![feature(const_refs_to_cell)]`.
After this CL bindings generated by `cc_bindings_from_rs` will require
a "nightly" version of the Rust compiler. This is unfortunate, but
this dependency already exists on `rs_bindings_from_cc` side (e.g.
requiring `impl_trait_in_assoc_type` and/or `type_alias_impl_trait`
unstable features).
This CL unblocks implementing `Drop` support. `Drop` support adds
bindings for additional types, some of which run into this bug.
PiperOrigin-RevId: 546337289
Change-Id: I1684b30a1ac096cc5115aabbe6e5c6504286947c
0 commit comments