rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Trying to use `new_bitfield_N` in static

Open NickeZ opened this issue 10 months ago • 0 comments

Hi!

I'm trying to use new_bitfield_N in a static. Is there a reason that the generated constructor isn't const?

error[E0015]: cannot call non-const fn `security_configuration::new_bitfield_1` in statics
   --> src/app_impl.rs:135:22
    |
135 |           _bitfield_1: da14531_sdk::bindings::security_configuration::new_bitfield_1(
    |  ______________________^
136 | |             gap_io_cap_GAP_IO_CAP_DISPLAY_YES_NO,
137 | |             gap_oob_GAP_OOB_AUTH_DATA_NOT_PRESENT,
138 | |         ),
    | |_________^

Regards

NickeZ avatar Feb 10 '25 12:02 NickeZ