1 #![warn(clippy::manual_async_fn)]
2 #![allow(clippy::needless_pub_self, unused)]
4 use std::future::Future;
6 async fn fut() -> i32 { 42 }
9 async fn fut2() -> i32 { 42 }
12 async fn fut3() -> i32 { 42 }
14 async fn empty_fut() {}
17 async fn empty_fut2() {}
20 async fn empty_fut3() {}
22 async fn core_fut() -> i32 { 42 }
25 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
36 async fn already_async() -> impl Future<Output = i32> {
42 async fn inh_fut() -> i32 {
43 // NOTE: this code is here just to check that the indentation is correct in the suggested fix
57 fn not_fut(&self) -> i32 {
62 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
68 async fn already_async(&self) -> impl Future<Output = i32> {
73 // Tests related to lifetime capture
75 async fn elided(_: &i32) -> i32 { 42 }
78 fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
82 async fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> i32 { 42 }
85 #[allow(clippy::needless_lifetimes)]
86 fn explicit_not_bound<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> {
92 use std::future::Future;
96 fn f(&self) -> impl Future<Output = ()> {
109 pub async fn issue_10450() -> i32 { 42 }
111 pub(crate) async fn issue_10450_2() -> i32 { 42 }
113 pub(self) async fn issue_10450_3() -> i32 { 42 }