Closed

Description
This code triggers a false positive for the "useless transmute" lint:
struct Example<'a> {
phdata: core::marker::PhantomData<&'a ()>
}
fn useless_transmute_false_positive<'a, 'b>(ex: Example<'a>) -> Example<'b> where 'a: 'b {
unsafe {
core::mem::transmute(ex)
}
}
This should not be considered useless because it changes information about the type, but for some reason the type is considered the same by clippy as shown in this message: transmute from a type (Example) to itself
Meta
Clippy Version: 0.1.52