Closed
Description
I believe I've come across a case where clippy gives a use_self
warning but shouldn't:
#![warn(use_self)]
pub trait Foo {
fn foo() -> Option<()>;
}
impl Foo for Option<i32> {
fn foo() -> Option<()> { // can't use `Self` here as `Self` is `Option<i32>` not `Option<()>`
unimplemented!()
}
}
fn main() {}
It's possible this is actually correct and it just wants me to specify Self
with different params in which case I'm just not sure what the syntax is for that.
Potentially related, I'd actually be interested in helping out with Clippy. If this seems like an easy issue to get started on I'd be happy to try to fix it myself!