mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 05:33:27 +00:00
b033883e2b
[`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 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |