-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't
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
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-negativeIssue: The lint should have been triggered on code, but wasn'tIssue: The lint should have been triggered on code, but wasn't