rust-clippy/clippy_utils
bors b033883e2b Auto merge of #10864 - y21:issue10437, r=blyxyas,xFrednet
[`unnecessary_lazy_eval`]: don't lint on types with deref impl

Fixes #10437.
This PR changes clippy's util module `eager_or_lazy` to also consider deref expressions whose type has a non-builtin deref impl and not suggest replacing it as that might have observable side effects.
A prominent example might be the `lazy_static` macro, which creates a newtype with a `Deref` impl that you need to go through to get access to the inner value. Going from lazy to eager can make a difference there.

changelog: [`unnecessary_lazy_eval`]: don't lint on types with non-builtin deref impl
2023-06-05 11:21:45 +00:00
..
src Auto merge of #10864 - y21:issue10437, r=blyxyas,xFrednet 2023-06-05 11:21:45 +00:00
Cargo.toml Bump Clippy version -> 0.1.72 2023-06-02 10:18:34 +02:00