3 #![warn(clippy::manual_async_fn)]
6 use std::future::Future;
8 async fn fut() -> i32 { 42 }
10 async fn empty_fut() {}
12 async fn core_fut() -> i32 { 42 }
15 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
26 async fn already_async() -> impl Future<Output = i32> {
32 async fn inh_fut() -> i32 {
33 // NOTE: this code is here just to check that the indentation is correct in the suggested fix
47 fn not_fut(&self) -> i32 {
52 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
58 async fn already_async(&self) -> impl Future<Output = i32> {
63 // Tests related to lifetime capture
65 async fn elided(_: &i32) -> i32 { 42 }
68 fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
72 async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
75 #[allow(clippy::needless_lifetimes)]
76 fn explicit_not_bound<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> {
82 use std::future::Future;
86 fn f(&self) -> impl Future<Output = ()> {