3 #![warn(clippy::manual_async_fn)]
6 use std::future::Future;
8 fn fut() -> impl Future<Output = i32> {
13 fn fut2() ->impl Future<Output = i32> {
18 fn fut3()-> impl Future<Output = i32> {
22 fn empty_fut() -> impl Future<Output = ()> {
27 fn empty_fut2() ->impl Future<Output = ()> {
32 fn empty_fut3()-> impl Future<Output = ()> {
36 fn core_fut() -> impl core::future::Future<Output = i32> {
41 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
52 async fn already_async() -> impl Future<Output = i32> {
58 fn inh_fut() -> impl Future<Output = i32> {
60 // NOTE: this code is here just to check that the indentation is correct in the suggested fix
75 fn not_fut(&self) -> i32 {
80 fn has_other_stmts() -> impl core::future::Future<Output = i32> {
86 async fn already_async(&self) -> impl Future<Output = i32> {
91 // Tests related to lifetime capture
93 fn elided(_: &i32) -> impl Future<Output = i32> + '_ {
98 fn elided_not_bound(_: &i32) -> impl Future<Output = i32> {
102 fn explicit<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> + 'a + 'b {
107 #[allow(clippy::needless_lifetimes)]
108 fn explicit_not_bound<'a, 'b>(_: &'a i32, _: &'b i32) -> impl Future<Output = i32> {
114 use std::future::Future;
118 fn f(&self) -> impl Future<Output = ()> {