Open
Description
Summary
The example in https://rust-lang.github.io/rust-clippy/master/index.html#/ref_as_ptr does not emit any warnings for the lint.
Lint Name
ref_as_ptr
Reproducer
I tried this code:
#![warn(clippy::ref_as_ptr)]
fn main() {
let a_ref = &1i32;
let a_ptr = a_ref as *const _;
}
I expected to see this happen:
Since this is the example for what not to do, the lint should emit a warning here suggesting to use ptr::from_ref
.
Instead, this happened:
No warnings.
Version
clippy commit befb659145a734e51a3708ff84315ae07123c880