Description
There is a defmt::bitflags!
macro which depends on the bitflags::bitflags!
macro from the bitflags v1
crate. Since it's introduction there was a bitflags v2
, but unfortunately we cannot just bump the dependency, since the defmt::bitflags!
macro leaks implementation details of the bitflags::bitflags!
macro and therefore the dependency update could break the code of defmt users.
Therefore we want to add two new cargo features to defmt: bitflags1
and bitflags2
. They each gate a defmt::bitflags
macro which depends on bitflags v1
and bitflags v2
respectively. To not break any existing code, the bitflags1
feature should be enabled by default. A compile_error
when both are enabled sounds useful as well.
Note that there is an existing PR to update to bitflags v2: #746.