7c34ec8947
consider autoderef through user-defined `Deref` in `eager_or_lazy` Fixes #10462 This PR handles autoderef in the `eager_or_lazy` util module and stops suggesting to change lazy to eager if autoderef in an expression goes through user defined `Deref` impls, e.g. ```rs struct S; impl Deref for S { type Target = (); fn deref(&self) -> &Self::Target { &() } } let _ = Some(()).as_ref().unwrap_or_else(|| &S); // autoderef `&S` -> `&()` ``` changelog: [`unnecessary_lazy_evaluations`]: don't suggest changing lazy evaluation to eager if autoderef goes through user-defined `Deref` r? `@xFrednet` (because of the earlier review in #10864, might help for context here)