Lymia / enumset

A library for compact bit sets containing enums.
Apache License 2.0
91 stars 35 forks source link

unneeded unit expression #44

Closed martinthomson closed 1 year ago

martinthomson commented 1 year ago

The clippy unused_unit lint is triggered in rust 1.69.0 and later builds.

#[deny(clippy::unused_unit)]
#[derive(enumset::EnumSetType)]
enum Example {
  One,
  Two,
}

The compiler output, even with -Z macro-backtrace isn't particularly helpful here, so I can't help identify the cause (the quoted line seems fine).

874 | pub fn derive_enum_set_type(input: TokenStream) -> TokenStream {
    | -------------------------------------------------------------- in this expansion of `#[derive(EnumSetType)]`