Closed
Description
Lint name: new_ret_no_self
pub struct Foo;
impl Foo {
pub fn new() -> impl Into<Self> {
Foo
}
}
causes a warning where it shouldn't. impl Into
here can be any trait that has Self
in generic arguments.
This is similar to #4359 but instead of Future<Output = Self>
it's Into<Self>
. #4365's title implies that this should be allowed but actually it only deals with associated types, not type parameters.
cargo clippy -V
: 0.1.54 (2021-06-09 eab201d)