rust-lang/rust-clippy

unused_lifetime false positive

Open

#2.678 aberto em 17 de abr. de 2018

Ver no GitHub
 (12 comments) (0 reactions) (1 assignee)Rust (1.391 forks)batch import
C-enhancementgood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

Description

I'm using this type of stuff in a -sys-crate:

unsafe extern "C" fn callback<'a>(data: *mut c_void) {
    let _s = Box::from_raw(data as *mut S<'a>);
}

and this triggers unused_lifetime.

Playground with more context (also shows the #2677 issue): https://play.rust-lang.org/?gist=21a412537258ede9cbda42350501b90a&version=nightly

Guia do colaborador