mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-12-14 07:12:51 +00:00
e255f36afe
new_ret_no_self: allow Self in inner type for impl Trait return types Check the inner types of associated types of a trait when checking for Self in the return type of a `new` method. This means that the following will no longer warn: ```rust trait Trait { type Inner; } struct S; impl S { fn new() -> impl Trait<Inner = Option<Self>> { struct TraitImpl; impl Trait for TraitImpl { type Inner = Option<S>; } TraitImpl } } ``` ```rust #![feature(async_await)] struct Connection; impl Connection { async fn new() -> Result<Self, ()> { Ok(S) } } ``` closes #4359 changelog: fix `new_ret_no_self` lint for async `new` functions. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |