ptr_as_ptr
does not trigger inside macros
#8120
Labels
C-bug
Category: Clippy is not doing the correct thing
good-first-issue
These issues are a good way to get started with Clippy
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
Casting a pointer with
as
does not trigger for code that comes from macro expansion even if that macro is local to the crate.Lint Name
ptr_as_ptr
Reproducer
I tried this code:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=62c639bef9acba6c027e0e027999e78e
I expected to see this happen: warning on the function call and on the function call inside the macro.
Instead, this happened: only one warning was issued:
Version
The text was updated successfully, but these errors were encountered: