-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have
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)
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thingI-false-positiveIssue: The lint was triggered on code it shouldn't haveIssue: The lint was triggered on code it shouldn't have