Closed
Description
This code
#![feature(async_await)]
struct S;
impl S {
async fn new() -> Result<Self, ()> {
Ok(S)
}
}
causes the following warning
warning: methods called `new` usually return `Self`
--> src/lib.rs:7:5
|
7 | / async fn new() -> Result<Self, ()> {
8 | | Ok(S)
9 | | }
| |_____^
|
= note: `#[warn(clippy::new_ret_no_self)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self
cargo clippy -V
clippy 0.0.212 (b041511 2019-08-07)