rustler icon indicating copy to clipboard operation
rustler copied to clipboard

clippy complains about unused liftetimes with rust 1.62.0

Open neosimsim opened this issue 2 years ago • 0 comments

After updating to rust 1.62.0 clippy complains, when using NifUntaggedEnum.

error: this lifetime isn't used in the impl
   |
23 | #[derive(Debug, NifUntaggedEnum, Clone, Copy, PartialEq)]
   |                 ^^^^^^^^^^^^^^^
   |
   = note: `-D clippy::extra-unused-lifetimes` implied by `-D warnings`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes
   = note: this error originates in the derive macro `NifUntaggedEnum` (in Nightly builds, run with -Z macro-backtrace for more info)

Here is a minimal example main.rs

use rustler_codegen::NifUntaggedEnum;

#[derive(Debug, NifUntaggedEnum, Clone, Copy, PartialEq)]
pub enum Timestamp {
    Microseconds(i64),
}


fn main() {
    println!("Hello, world!");
}

neosimsim avatar Jul 04 '22 10:07 neosimsim

Should be fixed by https://github.com/rusterlium/rustler/pull/483.

evnu avatar Sep 05 '22 08:09 evnu