rustler
rustler copied to clipboard
clippy complains about unused liftetimes with rust 1.62.0
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!");
}
Should be fixed by https://github.com/rusterlium/rustler/pull/483.