Closed
Description
What it does
Title says it all, but it could be extended to Result
and other enum
s
Advantage
Drawbacks
If a lib has this lint, it could lead to public API breakage. However, it may be worth it, considering this lint could prevent further breakages
Example
fn f<T>(a: &Option<T>) {
let _ = a.as_ref();
}
Could be written as:
fn f<T>(a: Option<&T>) {
let _ = a;
}