Skip to content

Commit

Permalink
fix(bitfield): missing lifetime in enum_from_bits! (#468)
Browse files Browse the repository at this point in the history
This commit fixes a missing lifetime in a `const` declaration generated
by the `enum_from_bits!` macro. Adding this missing lifetime fixes a
warning on recent nightly toolchains.
  • Loading branch information
hawkw committed Jan 21, 2024
1 parent 3eeab3f commit ba41d68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitfield/src/from_bits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ macro_rules! enum_from_bits {
}

impl $Type {
const VARIANTS: &[Self] = &[
const VARIANTS: &'static [Self] = &[
Self::$Variant1,
$(
Self::$Variant,
Expand Down

0 comments on commit ba41d68

Please sign in to comment.