borrow_as_ptr does not detect implicit casts due to coercions #14406
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
borrow_as_ptr
should detect&expr
in places where that is coerced to a raw pointer, and suggest&raw const expr
instead (and similar for the mutable case)Lint Name
borrow_as_ptr
Reproducer
I tried this code:
I expected to see this happen:
the lint should fire
Instead, this happened:
it does not fire
Version
The text was updated successfully, but these errors were encountered: