Skip to content

Commit 170c5f9

Browse files
committed
Add additional helpers to bitfield data structure
This commit addresses the case where a struct containing a bitfield is wrapped in a struct such as UnsafeCell which allows interior mutability. Previously, bitfield accessors only allowed a receiver. This becomes problematic in the case of interior mutability as raw pointer access may be required so as not to violate the aliasing rules in Rust.
1 parent 9a8e5ca commit 170c5f9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+9610
-474
lines changed

bindgen-tests/tests/expectations/tests/bitfield-32bit-overflow.rs

Lines changed: 884 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/bitfield-large.rs

Lines changed: 144 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bindgen-tests/tests/expectations/tests/bitfield-linux-32.rs

Lines changed: 119 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)